#[non_exhaustive]pub enum Value<'a> {
Absent,
Bool(bool),
Int(i64),
Float(f64),
Text(&'a str),
Html(SafeHtml<'a>),
Display(&'a dyn Display),
View(&'a dyn View),
List(&'a dyn List),
}Expand description
One value read from a view.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Absent
Nothing here (a missing field, an empty optional).
Bool(bool)
A boolean.
Int(i64)
An integer.
Float(f64)
A float.
Text(&'a str)
Text, escaped for its context by the engine.
Html(SafeHtml<'a>)
Trusted markup, written as it is.
Display(&'a dyn Display)
A computed value (money, a date), written as text and escaped.
View(&'a dyn View)
A nested object.
List(&'a dyn List)
A sequence.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for Value<'a>
impl<'a> !Send for Value<'a>
impl<'a> !Sync for Value<'a>
impl<'a> !UnwindSafe for Value<'a>
impl<'a> Forget for Value<'a>
impl<'a> Freeze for Value<'a>
impl<'a> Unpin for Value<'a>
impl<'a> UnsafeUnpin for Value<'a>
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