pub enum ContextValue {
String(String),
Integer(i64),
Float(f64),
Boolean(bool),
List(Vec<Self>),
Map(HashMap<String, Self>),
Null,
}Expand description
Context value types supporting common data types.
This provides a type-safe way to store heterogeneous values in the context while maintaining serializability.
Variants§
String(String)
String value.
Integer(i64)
Integer value (i64).
Float(f64)
Floating point value (f64).
Boolean(bool)
Boolean value.
List(Vec<Self>)
List of values.
Map(HashMap<String, Self>)
Nested map of values.
Null
Null/None value.
Trait Implementations§
Source§impl Clone for ContextValue
impl Clone for ContextValue
Source§fn clone(&self) -> ContextValue
fn clone(&self) -> ContextValue
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 ContextValue
impl Debug for ContextValue
Source§impl<'de> Deserialize<'de> for ContextValue
impl<'de> Deserialize<'de> for ContextValue
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<&str> for ContextValue
impl From<&str> for ContextValue
Source§impl<T: Into<ContextValue>> From<Option<T>> for ContextValue
impl<T: Into<ContextValue>> From<Option<T>> for ContextValue
Source§impl From<String> for ContextValue
impl From<String> for ContextValue
Source§impl<T: Into<ContextValue>> From<Vec<T>> for ContextValue
impl<T: Into<ContextValue>> From<Vec<T>> for ContextValue
Source§impl From<bool> for ContextValue
impl From<bool> for ContextValue
Source§impl From<f64> for ContextValue
impl From<f64> for ContextValue
Source§impl From<i32> for ContextValue
impl From<i32> for ContextValue
Source§impl From<i64> for ContextValue
impl From<i64> for ContextValue
Source§impl PartialEq for ContextValue
impl PartialEq for ContextValue
Source§impl Serialize for ContextValue
impl Serialize for ContextValue
impl StructuralPartialEq for ContextValue
Auto Trait Implementations§
impl Freeze for ContextValue
impl RefUnwindSafe for ContextValue
impl Send for ContextValue
impl Sync for ContextValue
impl Unpin for ContextValue
impl UnwindSafe for ContextValue
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