[][src]Struct wireguard_tools_rs::Device

pub struct Device(_);

Methods

impl Device[src]

pub fn name(&self) -> Result<String>[src]

pub fn set_name<S: Into<CString>>(&mut self, name: S) -> Result<()>[src]

pub fn public_key(&self) -> Option<PublicKey>[src]

pub fn secret_key(&self) -> Option<SecretKey>[src]

pub fn set_secret_key(&mut self, secret_key: Option<SecretKey>)[src]

pub fn listen_port(&self) -> Option<u16>[src]

pub fn set_listen_port(&mut self, listen_port: Option<u16>)[src]

pub fn fwmark(&self) -> Option<u32>[src]

pub fn set_fwmark(&mut self, fwmark: Option<u32>)[src]

pub fn ifindex(&self) -> u32[src]

pub fn set_ifindex(&mut self, ifindex: u32)[src]

pub fn devices() -> Result<Vec<Device>>[src]

pub fn get<S: Into<Vec<u8>>>(device_name: S) -> Result<Device>[src]

pub fn apply(&self) -> Result<()>[src]

pub fn add<S: Into<Vec<u8>>>(device_name: S) -> Result<()>[src]

pub fn del(&self) -> Result<()>[src]

pub fn get_peer<'a>(&'a self, peer: &PublicKey) -> Option<Peer<'a>>[src]

pub fn peers<'a>(&'a self) -> Vec<Peer<'a>>[src]

pub fn next_handshake(&self) -> Option<Duration>[src]

Trait Implementations

impl Debug for Device[src]

impl Drop for Device[src]

impl Send for Device[src]

impl Sync for Device[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.