pub enum RuntimeValue {
Null,
Boolean(bool),
Integer(i64),
UnsignedInteger(u64),
ByteString(Vec<u8>),
Array(Vec<RuntimeValue>),
Map(HashMap<String, RuntimeValue>),
}Expand description
Value type for runtime operations
Variants§
Null
Boolean(bool)
Integer(i64)
UnsignedInteger(u64)
ByteString(Vec<u8>)
Array(Vec<RuntimeValue>)
Map(HashMap<String, RuntimeValue>)
Implementations§
Source§impl RuntimeValue
impl RuntimeValue
Sourcepub fn from_bytes(bytes: &[u8]) -> Self
pub fn from_bytes(bytes: &[u8]) -> Self
Create from bytes
Sourcepub fn to_stack_item(&self) -> StackItem
pub fn to_stack_item(&self) -> StackItem
Convert to stack item
Sourcepub fn from_stack_item(item: &StackItem) -> Self
pub fn from_stack_item(item: &StackItem) -> Self
Create from stack item
Trait Implementations§
Source§impl Clone for RuntimeValue
impl Clone for RuntimeValue
Source§fn clone(&self) -> RuntimeValue
fn clone(&self) -> RuntimeValue
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 RuntimeValue
impl Debug for RuntimeValue
Source§impl Default for RuntimeValue
impl Default for RuntimeValue
Source§fn default() -> RuntimeValue
fn default() -> RuntimeValue
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for RuntimeValue
impl<'de> Deserialize<'de> for RuntimeValue
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<&[u8]> for RuntimeValue
impl From<&[u8]> for RuntimeValue
Source§impl From<&str> for RuntimeValue
impl From<&str> for RuntimeValue
Source§impl From<String> for RuntimeValue
impl From<String> for RuntimeValue
Source§impl From<bool> for RuntimeValue
impl From<bool> for RuntimeValue
Source§impl From<i64> for RuntimeValue
impl From<i64> for RuntimeValue
Source§impl From<u64> for RuntimeValue
impl From<u64> for RuntimeValue
Source§impl PartialEq for RuntimeValue
impl PartialEq for RuntimeValue
Source§impl Serialize for RuntimeValue
impl Serialize for RuntimeValue
impl StructuralPartialEq for RuntimeValue
Auto Trait Implementations§
impl Freeze for RuntimeValue
impl RefUnwindSafe for RuntimeValue
impl Send for RuntimeValue
impl Sync for RuntimeValue
impl Unpin for RuntimeValue
impl UnwindSafe for RuntimeValue
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§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more