pub enum ValueKind<'bp> {
Show 15 variants
Int(i64),
Float(f64),
Bool(bool),
Char(char),
Hex(Hex),
Color(Color),
Str(Cow<'bp, str>),
Null,
Map,
Attributes,
List(Box<[ValueKind<'bp>]>),
DynList(PendingValue),
DynMap(PendingValue),
Composite(PendingValue),
Range(usize, usize),
}Expand description
This value can never be part of an evaluation chain, only the return value.
It should only ever be the final type that is held by a Value, at
the end of an evaluation
Variants§
Int(i64)
Float(f64)
Bool(bool)
Char(char)
Hex(Hex)
Color(Color)
Str(Cow<'bp, str>)
Null
Map
Attributes
List(Box<[ValueKind<'bp>]>)
DynList(PendingValue)
DynMap(PendingValue)
Composite(PendingValue)
Range(usize, usize)
Implementations§
Source§impl ValueKind<'_>
impl ValueKind<'_>
pub fn to_int(&self) -> Option<i64>
pub fn as_int(&self) -> Option<i64>
pub fn as_float(&self) -> Option<f64>
pub fn as_bool(&self) -> Option<bool>
pub fn as_char(&self) -> Option<char>
pub fn as_hex(&self) -> Option<Hex>
pub fn as_color(&self) -> Option<Color>
pub fn as_str(&self) -> Option<&str>
pub fn as_list(&self) -> Option<&[Self]>
pub fn is_null(&self) -> bool
pub fn strings<F>(&self, f: F)
Trait Implementations§
Source§impl<'bp> PartialOrd for ValueKind<'bp>
impl<'bp> PartialOrd for ValueKind<'bp>
impl<'bp> StructuralPartialEq for ValueKind<'bp>
Auto Trait Implementations§
impl<'bp> Freeze for ValueKind<'bp>
impl<'bp> RefUnwindSafe for ValueKind<'bp>
impl<'bp> Send for ValueKind<'bp>
impl<'bp> Sync for ValueKind<'bp>
impl<'bp> Unpin for ValueKind<'bp>
impl<'bp> UnsafeUnpin for ValueKind<'bp>
impl<'bp> UnwindSafe for ValueKind<'bp>
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