Struct ring_channel::RingSender[][src]

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

The sending end of a ring_channel.


impl<T> RingSender<T>[src]

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

Sends a message through the channel without blocking.

  • If the channel is not disconnected, the message is pushed into the internal ring buffer.
    • If the internal ring buffer is full, the oldest pending message is overwritten.
  • If the channel is disconnected, SendError::Disconnected is returned.

Trait Implementations

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

impl<T> Debug for RingSender<T>[src]

impl<T> Drop for RingSender<T>[src]

impl<T: Eq> Eq for RingSender<T>[src]

impl<T: PartialEq> PartialEq<RingSender<T>> for RingSender<T>[src]

impl<T: Send> Send for RingSender<T>[src]

impl<T> Sink<T> for RingSender<T>[src]

type Error = SendError<T>

The type of value produced by the sink when an error occurs.

impl<T> StructuralEq for RingSender<T>[src]

impl<T> StructuralPartialEq for RingSender<T>[src]

Auto Trait Implementations

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

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

impl<T> Unpin for RingSender<T>[src]

impl<T> !UnwindSafe for RingSender<T>[src]

Blanket Implementations

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

impl<T> Borrow<T> for T where
    T: ?Sized

impl<T> BorrowMut<T> for T where
    T: ?Sized

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

impl<T, U> Into<U> for T where
    U: From<T>, 

impl<T, Item> SinkExt<Item> for T where
    T: Sink<Item> + ?Sized

impl<T> ToOwned for T where
    T: Clone

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 

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

The type returned in the event of a conversion error.