[−][src]Struct ipmpsc::Sender
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
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]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,