[][src]Struct snec::FnReceiver

pub struct FnReceiver<E: Entry, F: FnMut(&E::Data) = Box<dyn FnMut(&<E as Entry>::Data)>> {
    pub closure: F,
    // some fields omitted
}

A receiver which calls a closure when notified.

Fields

closure: F

The closure which is called when the receiver is notified.

Implementations

impl<E: Entry, F: FnMut(&E::Data)> FnReceiver<E, F>[src]

pub fn new(closure: F) -> Self[src]

Creates a new receiver from the specified closure.

Trait Implementations

impl<E: Entry, F: FnMut(&E::Data) + Clone> Clone for FnReceiver<E, F>[src]

impl<E: Entry, F: FnMut(&E::Data) + Copy> Copy for FnReceiver<E, F>[src]

impl<E: Entry, F: FnMut(&E::Data) + Debug> Debug for FnReceiver<E, F>[src]

impl<E: Entry, F: FnMut(&E::Data) + Default> Default for FnReceiver<E, F>[src]

impl<E: Entry, F: FnMut(&E::Data)> Receiver<E> for FnReceiver<E, F>[src]

impl<E: Entry, F: Fn(&E::Data), '_> Receiver<E> for &'_ FnReceiver<E, F>[src]

Auto Trait Implementations

impl<E, F> RefUnwindSafe for FnReceiver<E, F> where
    E: RefUnwindSafe,
    F: RefUnwindSafe

impl<E, F> Send for FnReceiver<E, F> where
    E: Send,
    F: Send

impl<E, F> Sync for FnReceiver<E, F> where
    E: Sync,
    F: Sync

impl<E, F> Unpin for FnReceiver<E, F> where
    E: Unpin,
    F: Unpin

impl<E, F> UnwindSafe for FnReceiver<E, F> where
    E: UnwindSafe,
    F: UnwindSafe

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.