[−][src]Trait smoltcp::phy::RxToken
A token to receive a single network packet.
Required methods
fn consume<R, F>(self, timestamp: Instant, f: F) -> Result<R> where
F: FnOnce(&mut [u8]) -> Result<R>,
F: FnOnce(&mut [u8]) -> Result<R>,
Consumes the token to receive a single network packet.
This method receives a packet and then calls the given closure f
with the raw
packet bytes as argument.
The timestamp must be a number of milliseconds, monotonically increasing since an arbitrary moment in time, such as system startup.