[][src]Struct event_listener_primitives::Bag

pub struct Bag<F: Send + Sync + 'static> { /* fields omitted */ }

Data structure that holds Fn() event handlers

Implementations

impl<F: Send + Sync + 'static> Bag<F>[src]

pub fn add(&self, callback: F) -> HandlerId[src]

Add new event handler to a bag

pub fn add_boxed_arc(&self, callback: Arc<Box<F>>) -> HandlerId[src]

Add new event handler to a bag that is already Arc<Box<Fn()>>

pub fn call<A>(&self, applicator: A) where
    A: Fn(&Box<F>), 
[src]

Call applicator with each handler and keep handlers in the bag

impl<F: Fn() + Send + Sync + 'static> Bag<F>[src]

pub fn call_simple(&self)[src]

Call each handler without arguments and keep handlers in the bag

Trait Implementations

impl<F: Send + Sync + 'static> Clone for Bag<F>[src]

impl<F: Send + Sync + 'static> Default for Bag<F>[src]

Auto Trait Implementations

impl<F> !RefUnwindSafe for Bag<F>[src]

impl<F> Send for Bag<F>[src]

impl<F> Sync for Bag<F>[src]

impl<F> Unpin for Bag<F>[src]

impl<F> !UnwindSafe for Bag<F>[src]

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.