From fc64e11cdd35051a2ea87237f548ae0497a2f7f9 Mon Sep 17 00:00:00 2001 From: Max Audron Date: Wed, 29 Apr 2020 00:00:44 +0200 Subject: refactor everything --- src/protocol/primitive/mod.rs | 74 ------------------------------------------- 1 file changed, 74 deletions(-) delete mode 100644 src/protocol/primitive/mod.rs (limited to 'src/protocol/primitive/mod.rs') diff --git a/src/protocol/primitive/mod.rs b/src/protocol/primitive/mod.rs deleted file mode 100644 index 5656d71..0000000 --- a/src/protocol/primitive/mod.rs +++ /dev/null @@ -1,74 +0,0 @@ -pub mod bufferinfo; -pub mod datetime; -pub mod message; -pub mod signedint; -pub mod string; -pub mod stringlist; -pub mod unsignedint; -pub mod variant; -pub mod variantlist; -pub mod variantmap; - -pub use bufferinfo::*; -pub use datetime::*; -pub use message::*; -pub use signedint::*; -pub use string::*; -pub use stringlist::*; -pub use unsignedint::*; -pub use variant::*; -pub use variantlist::*; -pub use variantmap::*; - -// Static Type Definitions -pub const VOID: u32 = 0x00000000; -pub const BOOL: u32 = 0x00000001; -pub const QCHAR: u32 = 0x00000007; - -pub const QVARIANT: u32 = 0x00000090; -pub const QVARIANTMAP: u32 = 0x00000008; -pub const QVARIANTLIST: u32 = 0x00000009; - -pub const QSTRING: u32 = 0x0000000a; -pub const QSTRINGLIST: u32 = 0x0000000b; -pub const QBYTEARRAY: u32 = 0x0000000c; - -pub const QDATE: u32 = 0x0000000e; -pub const QTIME: u32 = 0x0000000f; -pub const QDATETIME: u32 = 0x00000010; -pub const USERTYPE: u32 = 0x0000007f; - -// Basic types -pub const LONG: u32 = 0x00000081; // int64_t -pub const INT: u32 = 0x00000002; // int32_t -pub const SHORT: u32 = 0x00000082; // int16_t -pub const CHAR: u32 = 0x00000083; // int8_t - -pub const ULONG: u32 = 0x00000084; // uint64_t -pub const UINT: u32 = 0x00000003; // uint32_t -pub const USHORT: u32 = 0x00000085; // uint16_t -pub const UCHAR: u32 = 0x00000086; // uint8_t - -pub mod serialize { - use failure::Error; - pub trait Serialize { - fn serialize(&self) -> Result, Error>; - } - pub trait SerializeUTF8 { - fn serialize_utf8(&self) -> Result, Error>; - } -} - -pub mod deserialize { - use failure::Error; - pub trait Deserialize { - fn parse(b: &[u8]) -> Result<(usize, Self), Error> - where - Self: std::marker::Sized; - } - pub trait DeserializeUTF8 { - fn parse_utf8(b: &[u8]) -> Result<(usize, Self), Error> - where - Self: std::marker::Sized; - } -} -- cgit v1.2.3 30c144e16&follow=1'>commitdiff
Commit message (Collapse)AuthorLines
2021-05-26fix log breaking once buffer fullMax Audron-2/+33
the log_msg function was poping the newest message and replacing it with the newest message, it should be poping the oldest messages.
2021-05-16add deployment stuffMax Audron-6/+27786
2021-05-15add container buildMax Audron-2/+35