[][src]Struct event_listener_primitives::BagOnce

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

Data structure that holds FnOnce() event handlers

Implementations

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

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

Add new event handler to a bag

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

Call applicator with each handler and remove handlers from the bag

impl<F: FnOnce() + Send + 'static> BagOnce<F>[src]

pub fn call_simple(&self)[src]

Call each handler without arguments and remove handlers from the bag

Trait Implementations

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

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

Auto Trait Implementations

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

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

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

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

impl<F> !UnwindSafe for BagOnce<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.