Struct wgctrl_rs::PeerConfig [−][src]
pub struct PeerConfig { pub public_key: Key, pub preshared_key: Option<Key>, pub endpoint: Option<SocketAddr>, pub persistent_keepalive_interval: Option<u16>, pub allowed_ips: Vec<AllowedIp>, // some fields omitted }
Represents a single peer's configuration (i.e. persistent attributes).
These are the attributes that don't change over time and are part of the configuration.
Fields
public_key: Key
The public key of the peer.
The preshared key available to both peers (None
means no PSK is used).
endpoint: Option<SocketAddr>
The endpoint this peer listens for connections on (None
means any).
persistent_keepalive_interval: Option<u16>
The interval for sending keepalive packets (None
means disabled).
allowed_ips: Vec<AllowedIp>
The IP addresses this peer is allowed to have.
Trait Implementations
impl Debug for PeerConfig
[src]
impl Debug for PeerConfig
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl PartialEq for PeerConfig
[src]
impl PartialEq for PeerConfig
fn eq(&self, other: &PeerConfig) -> bool
[src]
fn eq(&self, other: &PeerConfig) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &PeerConfig) -> bool
[src]
fn ne(&self, other: &PeerConfig) -> bool
This method tests for !=
.
impl Eq for PeerConfig
[src]
impl Eq for PeerConfig
impl Clone for PeerConfig
[src]
impl Clone for PeerConfig
fn clone(&self) -> PeerConfig
[src]
fn clone(&self) -> PeerConfig
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
1.0.0
[src]Performs copy-assignment from source
. Read more
Auto Trait Implementations
impl Send for PeerConfig
impl Send for PeerConfig
impl Sync for PeerConfig
impl Sync for PeerConfig