Skip to main content

IpcProducer

Trait IpcProducer 

Source
pub trait IpcProducer: IpcTransport {
    // Required methods
    fn send(&self, msg: &[u8]) -> Result<(), IpcError>;
    fn try_send(&self, msg: &[u8]) -> Result<(), IpcError>;

    // Provided method
    fn send_vectored(&self, bufs: &[&[u8]]) -> Result<(), IpcError> { ... }
}
Expand description

Producer side : sends messages into the transport.

Required Methods§

Source

fn send(&self, msg: &[u8]) -> Result<(), IpcError>

Send a message, blocking if the buffer is full.

Source

fn try_send(&self, msg: &[u8]) -> Result<(), IpcError>

Send without blocking.

Provided Methods§

Source

fn send_vectored(&self, bufs: &[&[u8]]) -> Result<(), IpcError>

Send using vectored I/O (scatter-gather).

Default implementation concatenates buffers and calls send(). Subtypes may override for zero-copy scatter-gather.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§