Struct lunatic::channel::Sender[][src]

pub struct Sender<T> { /* fields omitted */ }

The sending side of a channel.

Senders can be cloned and shared among processes. When all senders associated with a channel are dropped, the channel becomes closed.

Implementations

impl<T> Sender<T> where
    T: Serialize + DeserializeOwned
[src]

pub fn send(&self, value: T) -> Result<(), ()>[src]

Sends a message into the channel.

If the channel is full, this method waits until there is space for a message.

If the channel is closed, this method returns an error.

Trait Implementations

impl<T> Clone for Sender<T>[src]

impl<'de, T> Deserialize<'de> for Sender<T> where
    T: Serialize + DeserializeOwned
[src]

impl<T> Serialize for Sender<T> where
    T: Serialize + DeserializeOwned
[src]

Auto Trait Implementations

impl<T> !RefUnwindSafe for Sender<T>[src]

impl<T> !Send for Sender<T>[src]

impl<T> !Sync for Sender<T>[src]

impl<T> Unpin for Sender<T> where
    T: Unpin
[src]

impl<T> UnwindSafe for Sender<T> where
    T: UnwindSafe
[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> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[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.