pub struct Device(/* private fields */);
Implementations§
Source§impl Device
impl Device
pub fn name(&self) -> Result<String>
pub fn set_name<S: Into<CString>>(&mut self, name: S) -> Result<()>
pub fn public_key(&self) -> Option<PublicKey>
pub fn secret_key(&self) -> Option<SecretKey>
pub fn set_secret_key(&mut self, secret_key: Option<SecretKey>)
pub fn listen_port(&self) -> Option<u16>
pub fn set_listen_port(&mut self, listen_port: Option<u16>)
pub fn fwmark(&self) -> Option<u32>
pub fn set_fwmark(&mut self, fwmark: Option<u32>)
pub fn ifindex(&self) -> u32
pub fn set_ifindex(&mut self, ifindex: u32)
pub fn devices() -> Result<Vec<Device>>
pub fn get<S: Into<Vec<u8>>>(device_name: S) -> Result<Device>
pub fn apply(&self) -> Result<()>
pub fn add<S: Into<Vec<u8>>>(device_name: S) -> Result<()>
pub fn del(&self) -> Result<()>
pub fn get_peer<'a>(&'a self, peer: &PublicKey) -> Option<Peer<'a>>
pub fn peers<'a>(&'a self) -> Vec<Peer<'a>>
pub fn next_handshake(&self) -> Option<Duration>
Trait Implementations§
impl Send for Device
impl Sync for Device
Auto Trait Implementations§
impl Freeze for Device
impl RefUnwindSafe for Device
impl Unpin for Device
impl UnwindSafe for Device
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