#[non_exhaustive]#[repr(u8)]pub enum Primitives {
Show 15 variants
u8 = 0,
i8 = 1,
u16 = 2,
i16 = 3,
u32 = 4,
i32 = 5,
f32 = 6,
u64 = 7,
i64 = 8,
f64 = 9,
u128 = 10,
i128 = 11,
bool = 12,
char = 13,
null = 14,
}Expand description
A set of possible primitives
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.
u8 = 0
i8 = 1
u16 = 2
i16 = 3
u32 = 4
i32 = 5
f32 = 6
u64 = 7
i64 = 8
f64 = 9
u128 = 10
i128 = 11
bool = 12
char = 13
null = 14
Implementations§
Source§impl Primitives
impl Primitives
Source§impl Primitives
impl Primitives
Sourcepub fn bytes_length(&self) -> usize
pub fn bytes_length(&self) -> usize
Returns the number of bytes required to encode/decode this value.
pub fn try_value_from_str( &self, val: &str, ) -> Result<PrimitiveValue, PrimitiveParseError>
Trait Implementations§
Source§impl Clone for Primitives
impl Clone for Primitives
Source§fn clone(&self) -> Primitives
fn clone(&self) -> Primitives
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 Primitives
impl Debug for Primitives
Source§impl EnumIterItem for Primitives
impl EnumIterItem for Primitives
type Item = Primitives
fn iter_items() -> IntoIter<Self::Item>
Source§impl From<Primitives> for PrimitiveType
impl From<Primitives> for PrimitiveType
Source§fn from(value: Primitives) -> Self
fn from(value: Primitives) -> Self
Converts to this type from the input type.
Source§impl Hash for Primitives
impl Hash for Primitives
Source§impl PartialEq for Primitives
impl PartialEq for Primitives
Source§impl TryFrom<&str> for Primitives
impl TryFrom<&str> for Primitives
Source§impl TryFrom<u8> for Primitives
impl TryFrom<u8> for Primitives
impl Copy for Primitives
impl Eq for Primitives
impl StructuralPartialEq for Primitives
Auto Trait Implementations§
impl Freeze for Primitives
impl RefUnwindSafe for Primitives
impl Send for Primitives
impl Sync for Primitives
impl Unpin for Primitives
impl UnwindSafe for Primitives
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