Struct ambient_ui::prelude::Hooks
source · pub struct Hooks<'a> { /* private fields */ }
Expand description
Hooks are a way to hook into the state and lifecycle of an Element.
They are inspired by React hooks.
Using hooks, you can store state, interact with the world, and generally do operations that go beyond the pure rendering of an Element.
Implementations§
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for Hooks<'a>
impl<'a> Send for Hooks<'a>
impl<'a> !Sync for Hooks<'a>
impl<'a> Unpin for Hooks<'a>
impl<'a> !UnwindSafe for Hooks<'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
source§impl<T> Downcast for T
impl<T> Downcast for T
source§impl<T> ElementComponentName for T
impl<T> ElementComponentName for T
source§fn element_component_name(&self) -> &'static str
fn element_component_name(&self) -> &'static str
Returns the name of the type implementing ElementComponent.