#[repr(u8)]pub enum Type {
Structure = 1,
Integer = 2,
LongInteger = 3,
BigInteger = 4,
Enumeration = 5,
Boolean = 6,
TextString = 7,
ByteString = 8,
DateTime = 9,
Interval = 10,
}Expand description
A TTLV type.
Variants§
Structure = 1
A TTLV structure.
This corresponds to a user-defined struct.
Integer = 2
A TTLV integer.
This corresponds to i32.
LongInteger = 3
A TTLV long integer.
This corresponds to i64.
BigInteger = 4
A TTLV big integer.
This is a variable-length signed integer type.
Enumeration = 5
A TTLV enumeration.
This corresponds to u32, but in practice it may be represented by
a user-defined enum.
Boolean = 6
A TTLV boolean.
This corresponds to bool.
TextString = 7
A TTLV text string.
This corresponds to str.
ByteString = 8
A TTLV byte string.
This corresponds to [u8] – a slice of bytes.
DateTime = 9
A TTLV date-time.
This is a 64-bit signed UNIX time value, in units of seconds.
Interval = 10
A TTLV interval.
This corresponds to Duration, but has a limited range and a
granularity of seconds.
Trait Implementations§
impl Copy for Type
impl Eq for Type
Source§impl Ord for Type
impl Ord for Type
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl Ordinalize for Type
impl Ordinalize for Type
Source§const VARIANT_COUNT: usize = 10usize
const VARIANT_COUNT: usize = 10usize
The count of variants.
Source§type VariantType = u8
type VariantType = u8
The type of the values of the variants.
Source§unsafe fn from_ordinal_unsafe(number: u8) -> Self
unsafe fn from_ordinal_unsafe(number: u8) -> Self
Obtain a variant based on an integer number. Read more
Source§fn from_ordinal(number: u8) -> Option<Self>
fn from_ordinal(number: u8) -> Option<Self>
Obtain a variant based on an integer number.
Source§impl PartialOrd for Type
impl PartialOrd for Type
impl StructuralPartialEq for Type
Auto Trait Implementations§
impl Forget for Type
impl Freeze for Type
impl Move for Type
impl RefUnwindSafe for Type
impl Send for Type
impl Sync for Type
impl Unpin for Type
impl UnsafeUnpin for Type
impl UnwindSafe for Type
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more