pub enum Property {
Value(JsValue),
Fn(Scope, Box<dyn Fn() -> JsValue + 'static, Global>),
}
Expand description
Represents the different possible values an element property could have, allowing you to do fine-grained updates to single fields.
This mostly exists for the view
macro’s use. You usually won’t need to interact with it directly, but it can be useful for defining
permissive APIs for certain components.
Variants§
Value(JsValue)
A static JavaScript value.
Fn(Scope, Box<dyn Fn() -> JsValue + 'static, Global>)
A (presumably reactive) function, which will be run inside an effect to toggle the class.
Auto Trait Implementations§
impl !RefUnwindSafe for Property
impl !Send for Property
impl !Sync for Property
impl Unpin for Property
impl !UnwindSafe for Property
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