pub enum StaticValue {
Bool(bool),
Int(i64),
Float(f64),
Str(String),
}Expand description
A literal prop value that travels as data — the wire-friendly subset of
what a view! prop can be. Anything that is not one of these (a computed
expression, a closure, a struct value) is a PropValue::Hole filled by
compiled code, not carried in the template.
Kept intentionally primitive so the descriptor has a trivial JSON form when the transport step needs one (see module docs for the serde deferral).
Variants§
Bool(bool)
Int(i64)
Integer literal. Widened to i64 so every view! integer literal fits
one variant; the registry narrows per-setter at inflate time.
Float(f64)
Str(String)
Trait Implementations§
Source§impl Clone for StaticValue
impl Clone for StaticValue
Source§fn clone(&self) -> StaticValue
fn clone(&self) -> StaticValue
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for StaticValue
impl Debug for StaticValue
Source§impl PartialEq for StaticValue
impl PartialEq for StaticValue
impl StructuralPartialEq for StaticValue
Auto Trait Implementations§
impl Freeze for StaticValue
impl RefUnwindSafe for StaticValue
impl Send for StaticValue
impl Sync for StaticValue
impl Unpin for StaticValue
impl UnsafeUnpin for StaticValue
impl UnwindSafe for StaticValue
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