pub struct Interface { /* private fields */ }Implementations§
Source§impl Interface
impl Interface
pub fn with_component<C: Component, T>( &self, f: impl FnOnce(&C) -> T, ) -> Result<Option<T>, RebindedError>
pub fn with_components<T>( &self, f: impl FnOnce(&Components) -> T, ) -> Result<T, RebindedError>
pub fn get_component<C: Component + Clone>( &self, ) -> Result<Option<C>, RebindedError>
Source§impl Interface
impl Interface
pub fn bind_interface(&self) -> &BindInterface
pub fn downgrade(&self) -> WeakInterface
pub fn same_io(&self, other: &Interface) -> bool
Trait Implementations§
Source§impl From<Interface> for WeakInterface
impl From<Interface> for WeakInterface
Source§impl IO for Interface
impl IO for Interface
Source§fn bound_addr(&self) -> Result<SocketAddr>
fn bound_addr(&self) -> Result<SocketAddr>
Get the actual address that this interface is bound to. Read more
Source§fn max_segment_size(&self) -> Result<usize>
fn max_segment_size(&self) -> Result<usize>
Maximum size of a single network segment in bytes
Source§fn max_segments(&self) -> Result<usize>
fn max_segments(&self) -> Result<usize>
Maximum number of segments that can be sent in a single batch
Source§fn poll_send(
&self,
cx: &mut Context<'_>,
pkts: &[IoSlice<'_>],
route: Route,
) -> Poll<Result<usize>>
fn poll_send( &self, cx: &mut Context<'_>, pkts: &[IoSlice<'_>], route: Route, ) -> Poll<Result<usize>>
Poll for sending packets Read more
Auto Trait Implementations§
impl !RefUnwindSafe for Interface
impl !UnwindSafe for Interface
impl Freeze for Interface
impl Send for Interface
impl Sync for Interface
impl Unpin for Interface
impl UnsafeUnpin for Interface
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