pub struct Bag<F: Send + Sync + Clone + 'static, A1: ?Sized = Private, A2: ?Sized = Private, A3: ?Sized = Private, A4: ?Sized = Private, A5: ?Sized = Private> { /* private fields */ }
Expand description
Data structure that holds Fn()
event handlers
Implementations§
Source§impl<F: Fn() + Send + Sync + ?Sized + 'static> Bag<Arc<F>>
impl<F: Fn() + Send + Sync + ?Sized + 'static> Bag<Arc<F>>
Sourcepub fn call_simple(&self)
pub fn call_simple(&self)
Call each handler without arguments and keep handlers in the bag
Source§impl<A1, F> Bag<Arc<F>, A1>
impl<A1, F> Bag<Arc<F>, A1>
Sourcepub fn call_simple(&self, a1: &A1)
pub fn call_simple(&self, a1: &A1)
Call each handler without arguments and keep handlers in the bag
Source§impl<A1, A2, F> Bag<Arc<F>, A1, A2>
impl<A1, A2, F> Bag<Arc<F>, A1, A2>
Sourcepub fn call_simple(&self, a1: &A1, a2: &A2)
pub fn call_simple(&self, a1: &A1, a2: &A2)
Call each handler without arguments and keep handlers in the bag
Source§impl<A1, A2, A3, F> Bag<Arc<F>, A1, A2, A3>
impl<A1, A2, A3, F> Bag<Arc<F>, A1, A2, A3>
Sourcepub fn call_simple(&self, a1: &A1, a2: &A2, a3: &A3)
pub fn call_simple(&self, a1: &A1, a2: &A2, a3: &A3)
Call each handler without arguments and keep handlers in the bag
Trait Implementations§
Auto Trait Implementations§
impl<F, A1, A2, A3, A4, A5> Freeze for Bag<F, A1, A2, A3, A4, A5>
impl<F, A1 = Private, A2 = Private, A3 = Private, A4 = Private, A5 = Private> !RefUnwindSafe for Bag<F, A1, A2, A3, A4, A5>
impl<F, A1, A2, A3, A4, A5> Send for Bag<F, A1, A2, A3, A4, A5>
impl<F, A1, A2, A3, A4, A5> Sync for Bag<F, A1, A2, A3, A4, A5>
impl<F, A1, A2, A3, A4, A5> Unpin for Bag<F, A1, A2, A3, A4, A5>
impl<F, A1 = Private, A2 = Private, A3 = Private, A4 = Private, A5 = Private> !UnwindSafe for Bag<F, A1, A2, A3, A4, A5>
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