[][src]Struct ipmpsc::Sender

pub struct Sender { /* fields omitted */ }

Represents the sending end of an inter-process channel.

Methods

impl Sender[src]

pub fn new(buffer: SharedRingBuffer) -> Self[src]

Constructs a Sender from the specified SharedRingBuffer

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

Send the specified message, waiting for sufficient contiguous space to become available in the ring buffer if necessary.

The serialized size of the message must be greater than zero or else this method will return Err(Error::from(error::ZeroSizedMessage)). If the serialized size is greater than the ring buffer capacity, this method will return Err(Error::from(error::MessageTooLarge)).

pub fn send_when_empty(&self, value: &impl Serialize) -> Result<(), Error>[src]

Send the specified message, waiting for the ring buffer to become completely empty first.

This method is appropriate for sending time-sensitive messages where buffering would introduce undesirable latency.

The serialized size of the message must be greater than zero or else this method will return Err(Error::from(error::ZeroSizedMessage)). If the serialized size is greater than the ring buffer capacity, this method will return Err(Error::from(error::MessageTooLarge)).

Trait Implementations

impl Clone for Sender[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

Auto Trait Implementations

impl Sync for Sender

impl Send for Sender

impl Unpin for Sender

impl !RefUnwindSafe for Sender

impl !UnwindSafe for Sender

Blanket Implementations

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

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

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