pub struct ListenerContainer<S: 'static> { /* private fields */ }Implementations§
Source§impl<S: 'static> ListenerContainer<S>
impl<S: 'static> ListenerContainer<S>
pub fn new() -> Self
pub fn register_listener_box<E: 'static>( &mut self, listener: Box<dyn Listener<E, S>>, )
pub fn register_listener<E: 'static, L: Listener<E, S> + 'static>( &mut self, listener: L, )
pub fn on_event<E: 'static>( &self, event: &E, state: &mut S, ) -> Result<(), Vec<OnEventError>>
Auto Trait Implementations§
impl<S> Freeze for ListenerContainer<S>
impl<S> !RefUnwindSafe for ListenerContainer<S>
impl<S> !Send for ListenerContainer<S>
impl<S> !Sync for ListenerContainer<S>
impl<S> Unpin for ListenerContainer<S>where
S: Unpin,
impl<S> UnsafeUnpin for ListenerContainer<S>
impl<S> !UnwindSafe for ListenerContainer<S>
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