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>,
/* private fields */
}
Expand description
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§
Source§impl Clone for PeerConfig
impl Clone for PeerConfig
Source§fn clone(&self) -> PeerConfig
fn clone(&self) -> PeerConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for PeerConfig
impl Debug for PeerConfig
Source§impl PartialEq for PeerConfig
impl PartialEq for PeerConfig
impl Eq for PeerConfig
impl StructuralPartialEq for PeerConfig
Auto Trait Implementations§
impl Freeze for PeerConfig
impl RefUnwindSafe for PeerConfig
impl Send for PeerConfig
impl Sync for PeerConfig
impl Unpin for PeerConfig
impl UnwindSafe for PeerConfig
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