Struct ambient_api::prelude::ambient_element::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
§impl<T> Downcast for Twhere
T: AsAny + ?Sized,
impl<T> Downcast for Twhere T: AsAny + ?Sized,
§fn downcast_ref<T>(&self) -> Option<&T>where
T: AsAny,
fn downcast_ref<T>(&self) -> Option<&T>where T: AsAny,
Forward to the method defined on the type
Any
.§fn downcast_mut<T>(&mut self) -> Option<&mut T>where
T: AsAny,
fn downcast_mut<T>(&mut self) -> Option<&mut T>where T: AsAny,
Forward to the method defined on the type
Any
.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.