pub struct Device<'a> {
    pub interface: DeviceInterface<'a>,
    pub flags: Vec<WgDeviceF>,
    pub private_key: Option<&'a [u8; 32]>,
    pub listen_port: Option<u16>,
    pub fwmark: Option<u32>,
    pub peers: Vec<Peer<'a>>,
}

Fields

interface: DeviceInterface<'a>flags: Vec<WgDeviceF>

0 or WGDEVICE_F_REPLACE_PEERS if all current peers should be removed prior to adding the

private_key: Option<&'a [u8; 32]>

all zeros to remove

listen_port: Option<u16>

0 to choose randomly

fwmark: Option<u32>

0 to disable

peers: Vec<Peer<'a>>

Implementations

Trait Implementations

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.