fn new(name: &InterfaceName) -> Self {
        let device_info = Device {
            name: *name,
            public_key: None,
            private_key: None,
            fwmark: None,
            listen_port: None,
            peers: vec![],
            linked_name: resolve_tun(name).ok(),
            backend: Backend::Userspace,
            __cant_construct_me: (),
        };

        Self {
            device_info,
            current_peer: None,
        }
    }
/// Returns `None` if an invalid device name was provided.
Returns `None` if an invalid device name was provided.
Returns ` None ` if an invalid device name was provided .
fn new(name: &InterfaceName) -> Self {
        let device_info = Device {
            name: *name,
            public_key: None,
            private_key: None,
            fwmark: None,
            listen_port: None,
            peers: vec![],
            linked_name: resolve_tun(name).ok(),
            backend: Backend::Userspace,
            __cant_construct_me: (),
        };
        Self {
            device_info,
            current_peer: None,
        }
    }
fn new ( name : & InterfaceName ) -> Self { let device_info = Device { name : * name , public_key : None , private_key : None , fwmark : None , listen_port : None , peers : vec ! [ ] , linked_name : resolve_tun ( name ) . ok ( ) , backend : Backend :: Userspace , __cant_construct_me : ( ) , } ; Self { device_info , current_peer : None , } }
Returns `None` if an invalid device name was provided.
Returns ` None ` if an invalid device name was provided .
name
&InterfaceName