Variants
VNet(Arc<Mutex<VNet>>)
Ifs(Vec<Interface>)
Implementations
sourceimpl Net
impl Net
pub fn new(config: Option<NetConfig>) -> Self
pub async fn get_interfaces(&self) -> Vec<Interface>
pub async fn get_interface(&self, ifc_name: &str) -> Option<Interface>
pub fn is_virtual(&self) -> bool
pub async fn resolve_addr(
&self,
use_ipv4: bool,
address: &str
) -> Result<SocketAddr>
pub async fn bind(
&self,
addr: SocketAddr
) -> Result<Arc<dyn Conn + Send + Sync>>
pub async fn dail(
&self,
use_ipv4: bool,
remote_addr: &str
) -> Result<Arc<dyn Conn + Send + Sync>>
pub fn get_nic(&self) -> Result<Arc<Mutex<dyn Nic + Send + Sync>>>
Auto Trait Implementations
impl !RefUnwindSafe for Net
impl Send for Net
impl Sync for Net
impl Unpin for Net
impl !UnwindSafe for Net
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more