pub trait LaneTxWithResult {
// Required method
fn publish_with_result<F, E>(
&mut self,
f: F,
) -> Result<(), LaneTxWithError<E>>
where F: FnOnce(&mut [u8]) -> Result<usize, E>;
}Expand description
TX side of a lane, slot-write publish with a fallible encoder.
This enables adapters/stages to write directly into the backing slot buffer and return an error without publishing.
Required Methods§
Sourcefn publish_with_result<F, E>(&mut self, f: F) -> Result<(), LaneTxWithError<E>>
fn publish_with_result<F, E>(&mut self, f: F) -> Result<(), LaneTxWithError<E>>
Publish a message by writing it into a provided slot buffer.
The closure returns the number of bytes written, or an error.
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.