Skip to main content

RawSend

Trait RawSend 

Source
pub trait RawSend: ErrorType {
    // Required method
    async fn send(
        &mut self,
        addr: [u8; 6],
        data: &[u8],
    ) -> Result<(), Self::Error>;
}
Expand description

Re-export the edge-nal crate This trait is implemented by UDP sockets and models their datagram sending functionality.

Required Methods§

Source

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

Send the provided data to a peer.

A MAC address is provided to specify the destination. If the destination mac address contains all 0xff, the packet is broadcasted.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

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

Source§

async fn send( &mut self, addr: [u8; 6], data: &[u8], ) -> Result<(), <&mut T as ErrorType>::Error>

Implementors§