[][src]Struct moteconnection::dispatcher::DispatcherHandle

pub struct DispatcherHandle {
    pub tx: Sender<Event<Bytes>>,
    pub rx: Receiver<Event<Bytes>>,
    pub stopper: Box<dyn FnOnce() -> Result<(), &'static str>>,
}

Provides a handle representing the dispatcher for the Connection.

Fields

tx: Sender<Event<Bytes>>

The sender end for the Connection

rx: Receiver<Event<Bytes>>

The receiver end for the Connection

stopper: Box<dyn FnOnce() -> Result<(), &'static str>>

The stopper function for the Dispatcher

Implementations

impl DispatcherHandle[src]

pub fn new(
    tx: Sender<Event<Bytes>>,
    rx: Receiver<Event<Bytes>>
) -> DispatcherHandle
[src]

Creates a new DispatcherHandle.

pub fn with_stopper(
    tx: Sender<Event<Bytes>>,
    rx: Receiver<Event<Bytes>>,
    stopper: Box<dyn FnOnce() -> Result<(), &'static str>>
) -> DispatcherHandle
[src]

Creates a new DispatcherHandle with a function to be called when stopping.

Auto Trait Implementations

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, 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.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,