pub enum PropertyType {
Scalar(ScalarType),
List(ScalarType, ScalarType),
}
Expand description
Data type used to encode properties in the payload.
There are two possible types: scalars and lists. Lists are a sequence of scalars with a leading integer value defining how many elements the list contains.
Variants§
Scalar(ScalarType)
Simple, “one-number” type.
List(ScalarType, ScalarType)
Defines a sequence of scalars with the same type.
First value is the index type which should be an integer variant,
Encoded in ascii, you always get the same number in the file (for example 32
or 17
).
Hence, a good choice is mainly important for internal representation and binary encoding. T
he possible trade-off should be obvious:
List length/flexibility against storage size. Though this obviously depends on your specific use case.
Second value is the type of the list elemetns.
Trait Implementations§
Source§impl Clone for PropertyType
impl Clone for PropertyType
Source§fn clone(&self) -> PropertyType
fn clone(&self) -> PropertyType
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for PropertyType
impl Debug for PropertyType
Source§impl PartialEq for PropertyType
impl PartialEq for PropertyType
impl Eq for PropertyType
impl StructuralPartialEq for PropertyType
Auto Trait Implementations§
impl Freeze for PropertyType
impl RefUnwindSafe for PropertyType
impl Send for PropertyType
impl Sync for PropertyType
impl Unpin for PropertyType
impl UnwindSafe for PropertyType
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)