#[non_exhaustive]pub enum DynamicallySizedValue {
str(String),
u8_blob(Vec<u8>),
u16_blob(Vec<u8>),
u32_blob(Vec<u8>),
u64_blob(Vec<u8>),
}
Expand description
An enumeration to store the value of a dynamic/variable sized element
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
str(String)
A string
u8_blob(Vec<u8>)
A blob of u8 of max length 255 (u8)
u16_blob(Vec<u8>)
A blob of u8 of max length 65535 (u16)
u32_blob(Vec<u8>)
A blob of u8 of max length u32::MAX
(u32)
u64_blob(Vec<u8>)
A blob of u8 of max length u64::MAX
(u64)
Implementations§
Source§impl DynamicallySizedValue
impl DynamicallySizedValue
Sourcepub const fn primitive(&self) -> VariableType
pub const fn primitive(&self) -> VariableType
Returns the type of this primitive
Trait Implementations§
Source§impl Clone for DynamicallySizedValue
impl Clone for DynamicallySizedValue
Source§fn clone(&self) -> DynamicallySizedValue
fn clone(&self) -> DynamicallySizedValue
Returns a duplicate 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 DynamicallySizedValue
impl Debug for DynamicallySizedValue
Source§impl Display for DynamicallySizedValue
impl Display for DynamicallySizedValue
Source§impl From<DynamicallySizedValue> for VariableValue
impl From<DynamicallySizedValue> for VariableValue
Source§fn from(value: DynamicallySizedValue) -> Self
fn from(value: DynamicallySizedValue) -> Self
Converts to this type from the input type.
Source§impl PartialEq for DynamicallySizedValue
impl PartialEq for DynamicallySizedValue
impl Eq for DynamicallySizedValue
impl StructuralPartialEq for DynamicallySizedValue
Auto Trait Implementations§
impl Freeze for DynamicallySizedValue
impl RefUnwindSafe for DynamicallySizedValue
impl Send for DynamicallySizedValue
impl Sync for DynamicallySizedValue
impl Unpin for DynamicallySizedValue
impl UnwindSafe for DynamicallySizedValue
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