Handler
struct · ferroui-view · v0.5.0
struct Handler
A handler of an element. Its closure is in a cell that the attached trampoline reads, so that a component that runs again with handlers of the same identities in the same order swaps the closures into the cells of the attached handlers instead of detaching and attaching them.
Members
identity
identity: usize
What it handles: the address of the routed event or of the property; 0 for a handler that is attached again on every run.
attach
attach: Attach
Attaches the trampoline of cell to a control.
cell
cell: std::rc::Rc<dyn Any>
The closure: a RefCell<Rc<dyn Fn(..)>> of the type of the handler.
swap
swap: fn(&dyn Any, &dyn Any) -> ()
Puts the closure of the second cell into the first (cells of this handler's type).
attached_again
fn attached_again(attach: Attach) -> Self
A handler that is attached again on every run (no cell to swap).
Trait implementations
SendSyncFreezeUnsafeUnpinUnpinUnwindSafeRefUnwindSafeIntoValue<T>FromValue<T>FromValue<Option<T>>IntoProp<T, Value>Borrow<T>BorrowMut<T>CloneToUninitInto<U>From<T>TryInto<U>TryFrom<U>AnyToOwnedClassDefaultsErasedDestructorIntoEitherClone
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.