pub struct Net { /* private fields */ }Implementations§
Source§impl Net
impl Net
pub fn new(interface: impl Interface, dma_op: &'static dyn DmaOp) -> Self
pub fn mac_address(&self) -> [u8; 6]
Sourcepub fn wifi_control(&self) -> Option<&mut dyn WifiControl>
pub fn wifi_control(&self) -> Option<&mut dyn WifiControl>
Access the device’s optional wireless control plane.
Returns None for a plain wired NIC. Forwards to
Interface::wifi_control so the upper layers can drive a wireless
device (STA/SoftAP control, link policy, RX wake) through the same net
device handle as any other NIC.
pub fn enable_irq(&mut self)
pub fn disable_irq(&mut self)
pub fn is_irq_enabled(&self) -> bool
pub fn create_tx_queue(&mut self) -> Result<TxQueue, NetError>
pub fn create_rx_queue(&mut self) -> Result<RxQueue, NetError>
pub fn take_irq_handler(&mut self) -> Option<IrqHandler>
Sourcepub fn wifi_control_handle(&self) -> Option<WifiControlHandle>
pub fn wifi_control_handle(&self) -> Option<WifiControlHandle>
Detaches a standalone control-plane handle for this device.
Returns None for a plain wired NIC. The handle clones the same
Arc<NetInner> the data plane uses (like [Net::irq_handler]), so the
control plane (STA/SoftAP switch, link policy) stays reachable after
Net is consumed into a driver. Used to drive runtime Wi-Fi mode
switching from a separate task/syscall context.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Net
impl !UnwindSafe for Net
impl Freeze for Net
impl Send for Net
impl Sync for Net
impl Unpin for Net
impl UnsafeUnpin for Net
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