Struct net::NetworkInterface
source · pub struct NetworkInterface { /* private fields */ }
Expand description
A network interface.
This is a wrapper around a network device which provides higher level abstractions such as polling sockets.
Implementations§
source§impl NetworkInterface
impl NetworkInterface
sourcepub fn add_socket<T>(self: Arc<Self>, socket: T) -> Socket<T>where
T: AnySocket<'static>,
pub fn add_socket<T>(self: Arc<Self>, socket: T) -> Socket<T>where T: AnySocket<'static>,
Adds a socket to the interface.
sourcepub fn poll(&self) -> bool
pub fn poll(&self) -> bool
Polls the sockets associated with the interface.
Returns a boolean indicating whether the readiness of any socket may have changed.
pub fn capabilities(&self) -> DeviceCapabilities
Auto Trait Implementations§
impl !RefUnwindSafe for NetworkInterface
impl Send for NetworkInterface
impl Sync for NetworkInterface
impl Unpin for NetworkInterface
impl !UnwindSafe for NetworkInterface
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