Skip to main content

PhysicalWrite

Trait PhysicalWrite 

Source
pub trait PhysicalWrite {
    type Error;

    // Required method
    fn write(
        &mut self,
        data: &[u8],
    ) -> impl Future<Output = Result<(), Self::Error>>;
}
Expand description

Async trait for writing raw bytes to a physical channel.

Required Associated Types§

Source

type Error

Error type for write operations.

Required Methods§

Source

fn write( &mut self, data: &[u8], ) -> impl Future<Output = Result<(), Self::Error>>

Writes the given data bytes to the physical channel.

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§