pub struct Value<'bp> { /* private fields */ }Expand description
This is the final value for a node attribute / value.
This should be evaluated fully for the ValueKind
Implementations§
Source§impl<'bp> Value<'bp>
impl<'bp> Value<'bp>
pub fn new( expr: ValueExpr<'bp>, sub: Subscriber, attribute_storage: &AttributeStorage<'bp>, ) -> Self
pub fn truthiness(&self) -> bool
pub fn reload(&mut self, attribute_storage: &AttributeStorage<'bp>)
pub fn try_as<T>(&self) -> Option<T>
pub fn strings<F>(&self, f: F)
Methods from Deref<Target = ValueKind<'a>>§
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§
Auto Trait Implementations§
impl<'bp> Freeze for Value<'bp>
impl<'bp> !RefUnwindSafe for Value<'bp>
impl<'bp> !Send for Value<'bp>
impl<'bp> !Sync for Value<'bp>
impl<'bp> Unpin for Value<'bp>
impl<'bp> UnsafeUnpin for Value<'bp>
impl<'bp> !UnwindSafe for Value<'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