Skip to main content

DatalinkWrite

Trait DatalinkWrite 

Source
pub trait DatalinkWrite {
    type Error: Error;

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

Send direction of the data link layer.

Required Associated Types§

Source

type Error: Error

Error type for write operations.

Required Methods§

Source

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

Write data over the link.

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.

Implementations on Foreign Types§

Source§

impl<T: DatalinkWrite + ?Sized> DatalinkWrite for &mut T

Source§

type Error = <T as DatalinkWrite>::Error

Source§

async fn write(&mut self, data: &[u8]) -> Result<(), Self::Error>

Implementors§