LaneTxWith

Trait LaneTxWith 

Source
pub trait LaneTxWith {
    // Required method
    fn publish_with<F>(&mut self, f: F) -> Result<(), LaneTxError>
       where F: FnOnce(&mut [u8]) -> usize;
}
Expand description

TX side of a lane, slot-write publish.

This enables adapters to write directly into the backing slot buffer, avoiding an intermediate copy.

Required Methods§

Source

fn publish_with<F>(&mut self, f: F) -> Result<(), LaneTxError>
where F: FnOnce(&mut [u8]) -> usize,

Publish a message by writing it into a provided slot buffer.

The closure returns the number of bytes written.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§