pub(crate) async fn new(params: Params) -> Result<Self> {
        let (files, iface) = Self::alloc(params, 1).await?;
        let file = files.into_iter().next().unwrap();
        Ok(Self {
            file,
            iface: Arc::new(iface),
        })
    }
/// Creates a new instance of Tun/Tap device.
Creates a new instance of Tun/Tap device.
Creates a new instance of Tun / Tap device .
pub(crate) async fn new(params: Params) -> Result<Self> {
        let (files, iface) = Self::alloc(params, 1).await?;
        let file = files.into_iter().next().unwrap();
        Ok(Self {
            file,
            iface: Arc::new(iface),
        })
    }
pub ( crate ) async fn new ( params : Params ) -> Result < Self > { let ( files , iface ) = Self :: alloc ( params , 1 ) . await ? ; let file = files . into_iter ( ) . next ( ) . unwrap ( ) ; Ok ( Self { file , iface : Arc :: new ( iface ) , } ) }
Creates a new instance of Tun/Tap device.
Creates a new instance of Tun / Tap device .
params
Params
params
Params