Trait RawSocket

Source
pub trait RawSocket {
    type Error: Error;

    // Required methods
    async fn send(
        &mut self,
        mac: Option<&[u8; 6]>,
        data: &[u8],
    ) -> Result<(), Self::Error>;
    async fn receive_into(
        &mut self,
        buffer: &mut [u8],
    ) -> Result<(usize, [u8; 6]), Self::Error>;
}

Required Associated Types§

Required Methods§

Source

async fn send( &mut self, mac: Option<&[u8; 6]>, data: &[u8], ) -> Result<(), Self::Error>

Source

async fn receive_into( &mut self, buffer: &mut [u8], ) -> Result<(usize, [u8; 6]), Self::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.

Implementations on Foreign Types§

Source§

impl<T> RawSocket for &mut T
where T: RawSocket,

Source§

type Error = <T as RawSocket>::Error

Source§

async fn send( &mut self, mac: Option<&[u8; 6]>, data: &[u8], ) -> Result<(), Self::Error>

Source§

async fn receive_into( &mut self, buffer: &mut [u8], ) -> Result<(usize, [u8; 6]), Self::Error>

Implementors§