pub enum PrimitiveType {
Primitive(Primitives),
Array(Primitives, usize),
DynamicallySized(VariableType),
}
Expand description
An enumeration to describe the type of a pseudo-primitve
Variants§
Implementations§
Source§impl PrimitiveType
impl PrimitiveType
Source§impl PrimitiveType
impl PrimitiveType
Sourcepub fn bytes_length(&self) -> Option<usize>
pub fn bytes_length(&self) -> Option<usize>
Returns the number of bytes required to encode/decode this value. If dynamic, returns None.
Trait Implementations§
Source§impl Clone for PrimitiveType
impl Clone for PrimitiveType
Source§fn clone(&self) -> PrimitiveType
fn clone(&self) -> PrimitiveType
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 PrimitiveType
impl Debug for PrimitiveType
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 From<VariableType> for PrimitiveType
impl From<VariableType> for PrimitiveType
Source§fn from(value: VariableType) -> Self
fn from(value: VariableType) -> Self
Converts to this type from the input type.
Source§impl PartialEq for PrimitiveType
impl PartialEq for PrimitiveType
impl Copy for PrimitiveType
impl Eq for PrimitiveType
impl StructuralPartialEq for PrimitiveType
Auto Trait Implementations§
impl Freeze for PrimitiveType
impl RefUnwindSafe for PrimitiveType
impl Send for PrimitiveType
impl Sync for PrimitiveType
impl Unpin for PrimitiveType
impl UnwindSafe for PrimitiveType
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