pub struct ForComponent<C, E> { /* private fields */ }Expand description
Typed wrapper for a component event filtered to one component type.
A service implements Hook<ForComponent<MyComponent, ComponentMounted>>
and installs it with App::hook_component_plugin::<Service, MyComponent, ComponentMounted>(). This is for app-specific overrides where
the plugin intentionally targets a known component. Reusable component
behavior should normally be owned by the component through Plugin<T> or
Option<Plugin<T>> extraction.
Implementations§
Source§impl<C, E> ForComponent<C, E>
impl<C, E> ForComponent<C, E>
pub fn event(&self) -> &E
pub fn into_event(self) -> E
Trait Implementations§
Source§impl<C, E: Clone> Clone for ForComponent<C, E>
impl<C, E: Clone> Clone for ForComponent<C, E>
Source§impl<C, E: Debug> Debug for ForComponent<C, E>
impl<C, E: Debug> Debug for ForComponent<C, E>
Auto Trait Implementations§
impl<C, E> Freeze for ForComponent<C, E>where
E: Freeze,
impl<C, E> RefUnwindSafe for ForComponent<C, E>where
E: RefUnwindSafe,
impl<C, E> Send for ForComponent<C, E>where
E: Send,
impl<C, E> Sync for ForComponent<C, E>where
E: Sync,
impl<C, E> Unpin for ForComponent<C, E>where
E: Unpin,
impl<C, E> UnsafeUnpin for ForComponent<C, E>where
E: UnsafeUnpin,
impl<C, E> UnwindSafe for ForComponent<C, E>where
E: UnwindSafe,
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