pub enum Value {
Show 29 variants
Attributes(Attributes),
ReflectStruct(Arc<dyn ReflectStruct + Sync + Send>),
VFileBuilder(Arc<dyn VFileBuilder>),
Bool(bool),
U8(u8),
U16(u16),
U32(u32),
U64(u64),
I8(i8),
I16(i16),
I32(i32),
I64(i64),
F32(f32),
F64(f64),
USize(usize),
Char(char),
String(String),
Str(Cow<'static, str>),
Unit,
Option(Option<Box<Value>>),
Newtype(Box<Value>),
Seq(Vec<Value>),
Bytes(Vec<u8>),
DateTime(DateTime<Utc>),
Map(HashMap<String, Value>),
Func(Arc<Box<dyn Fn() -> Value + Sync + Send>>),
FuncArg(Arc<Box<dyn Fn(Value) -> Value + Sync + Send>>, Box<Value>),
NodeId(TreeNodeId),
AttributePath(AttributePath),
}
Variants
Attributes(Attributes)
ReflectStruct(Arc<dyn ReflectStruct + Sync + Send>)
VFileBuilder(Arc<dyn VFileBuilder>)
Bool(bool)
U8(u8)
U16(u16)
U32(u32)
U64(u64)
I8(i8)
I16(i16)
I32(i32)
I64(i64)
F32(f32)
F64(f64)
USize(usize)
Char(char)
String(String)
Str(Cow<'static, str>)
Unit
Option(Option<Box<Value>>)
Newtype(Box<Value>)
Seq(Vec<Value>)
Bytes(Vec<u8>)
DateTime(DateTime<Utc>)
Map(HashMap<String, Value>)
Func(Arc<Box<dyn Fn() -> Value + Sync + Send>>)
FuncArg(Arc<Box<dyn Fn(Value) -> Value + Sync + Send>>, Box<Value>)
NodeId(TreeNodeId)
AttributePath(AttributePath)
Implementations
sourceimpl Value
impl Value
pub fn type_id(&self) -> ValueTypeId
sourceimpl Value
impl Value
pub fn as_string(&self) -> String
pub fn try_as_string(&self) -> Option<String>
pub fn as_vec(&self) -> Vec<Value>
pub fn try_as_vec(&self) -> Option<Vec<Value>>
pub fn as_attributes(&self) -> Attributes
pub fn try_as_attributes(&self) -> Option<Attributes>
pub fn as_reflect_struct(&self) -> Arc<dyn ReflectStruct>
pub fn try_as_reflect_struct(&self) -> Option<Arc<dyn ReflectStruct>>
pub fn as_vfile_builder(&self) -> Arc<dyn VFileBuilder>
pub fn try_as_vfile_builder(&self) -> Option<Arc<dyn VFileBuilder>>
pub fn as_date_time(&self) -> DateTime<Utc>
pub fn try_as_date_time(&self) -> Option<DateTime<Utc>>
Trait Implementations
sourceimpl<'de> Deserialize<'de> for Value
impl<'de> Deserialize<'de> for Value
sourcefn 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
sourceimpl From<(Arc<Box<dyn Fn(Value) + Send + Sync + 'static, Global>>, Box<Value, Global>)> for Value
impl From<(Arc<Box<dyn Fn(Value) + Send + Sync + 'static, Global>>, Box<Value, Global>)> for Value
sourceimpl From<Arc<dyn VFileBuilder + 'static>> for Value
impl From<Arc<dyn VFileBuilder + 'static>> for Value
sourcefn from(input: Arc<dyn VFileBuilder>) -> Self
fn from(input: Arc<dyn VFileBuilder>) -> Self
Performs the conversion.
sourceimpl From<AttributePath> for Value
impl From<AttributePath> for Value
sourcefn from(input: AttributePath) -> Self
fn from(input: AttributePath) -> Self
Performs the conversion.
sourceimpl From<Attributes> for Value
impl From<Attributes> for Value
sourcefn from(input: Attributes) -> Self
fn from(input: Attributes) -> Self
Performs the conversion.
sourceimpl PartialOrd<Value> for Value
impl PartialOrd<Value> for Value
sourcefn partial_cmp(&self, other: &Self) -> Option<Ordering>
fn partial_cmp(&self, other: &Self) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
Auto Trait Implementations
impl !RefUnwindSafe for Value
impl Send for Value
impl Sync for Value
impl Unpin for Value
impl !UnwindSafe for Value
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Serialize for T where
T: Serialize + ?Sized,
impl<T> Serialize for T where
T: Serialize + ?Sized,
pub fn erased_serialize(
&self,
serializer: &mut dyn Serializer
) -> Result<Ok, Error>
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more