pub enum Primitive {
String(String),
NumericValue(NumericPrimitive),
Uuid(Uuid),
Bytes(Vec<u8>),
Bool(bool),
ListHeader(ListHeader),
ObjectHeader(ObjectHeader),
Nil,
Address(Address),
}
Expand description
A value stored in KCEP program memory.
Variants§
String(String)
UTF-8 text
NumericValue(NumericPrimitive)
Various number kinds
Uuid(Uuid)
UUID
Bytes(Vec<u8>)
Raw binary
Bool(bool)
True or false
ListHeader(ListHeader)
List metadata.
ObjectHeader(ObjectHeader)
Object metadata.
Nil
An optional value which was not given.
Address(Address)
Address in KCEP memory.
Trait Implementations§
source§impl<'de> Deserialize<'de> for Primitive
impl<'de> Deserialize<'de> for Primitive
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl From<ListHeader> for Primitive
impl From<ListHeader> for Primitive
source§fn from(value: ListHeader) -> Self
fn from(value: ListHeader) -> Self
Converts to this type from the input type.
source§impl From<ObjectHeader> for Primitive
impl From<ObjectHeader> for Primitive
source§fn from(value: ObjectHeader) -> Self
fn from(value: ObjectHeader) -> Self
Converts to this type from the input type.
source§impl PartialEq for Primitive
impl PartialEq for Primitive
source§impl TryFrom<Primitive> for ListHeader
impl TryFrom<Primitive> for ListHeader
source§impl TryFrom<Primitive> for ObjectHeader
impl TryFrom<Primitive> for ObjectHeader
source§impl Value for Primitive
impl Value for Primitive
source§fn into_parts(self) -> Vec<Primitive>
fn into_parts(self) -> Vec<Primitive>
Store the value in memory.
source§fn from_parts<I>(values: &mut I) -> Result<(Self, usize), MemoryError>
fn from_parts<I>(values: &mut I) -> Result<(Self, usize), MemoryError>
Read the value from memory.
impl StructuralPartialEq for Primitive
Auto Trait Implementations§
impl Freeze for Primitive
impl RefUnwindSafe for Primitive
impl Send for Primitive
impl Sync for Primitive
impl Unpin for Primitive
impl UnwindSafe for Primitive
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