pub struct Controller<'a> { /* private fields */ }Expand description
A reference to the endpoint of layers below (phy + eth).
This is not really useful on its own but should instead be used either within a Packet or a
RawPacket. Some of the methods offered there will access the non-public members of this
struct to fulfill their task.
Implementations§
Source§impl<'a> Controller<'a>
impl<'a> Controller<'a>
Sourcepub fn borrow_mut(&mut self) -> Controller<'_>
pub fn borrow_mut(&mut self) -> Controller<'_>
Proof to the compiler that we can shorten the lifetime arbitrarily.
Sourcepub fn info(&self) -> &dyn Info
pub fn info(&self) -> &dyn Info
Get a reference to the network device information.
This is a central method since the ethernet layer abstracts over the phsical media in use. It splits the raw packet buffers supplied by the network device into a dynamic trait object with the device info (part of the handle) on one hand and the payload buffer on the other. This removes some detailed information on the device but simplifies layers on top.
Auto Trait Implementations§
impl<'a> Freeze for Controller<'a>
impl<'a> !RefUnwindSafe for Controller<'a>
impl<'a> !Send for Controller<'a>
impl<'a> !Sync for Controller<'a>
impl<'a> Unpin for Controller<'a>
impl<'a> !UnwindSafe for Controller<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more