pub enum Value {
Null,
Bool(bool),
Int(i64),
UInt(u64),
Float(f64),
Str(String),
List(Vec<Value>),
}Expand description
One prop value: text, a number, true or false, or a list.
You rarely build one by hand. Anything that converts with .into() works:
&str, String, bool, every integer type, f32, f64, Option<T>
(None means “leave it out”), and Vec<T> or arrays for lists.
Variants§
Null
No value. The prop is left out. In per-call page props it removes a configured prop with the same key.
Bool(bool)
true or false.
Int(i64)
A whole number.
UInt(u64)
A whole number too big for i64.
Float(f64)
A number with a fraction.
Str(String)
Text.
List(Vec<Value>)
A list of values.
Trait Implementations§
impl StructuralPartialEq for Value
Auto Trait Implementations§
impl Freeze for Value
impl RefUnwindSafe for Value
impl Send for Value
impl Sync for Value
impl Unpin for Value
impl UnsafeUnpin for Value
impl UnwindSafe for Value
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