Struct netplan_types::WireGuardPeer
source · [−]pub struct WireGuardPeer {
pub endpoint: Option<String>,
pub allowed_ips: Option<Vec<String>>,
pub keepalive: Option<u32>,
pub keys: Option<WireGuardPeerKey>,
}Expand description
A list of peers
Fields
endpoint: Option<String>Remote endpoint IPv4/IPv6 address or a hostname, followed by a colon and a port number.
allowed_ips: Option<Vec<String>>A list of IP (v4 or v6) addresses with CIDR masks from which this peer is allowed to send incoming traffic and to which outgoing traffic for this peer is directed. The catch-all 0.0.0.0/0 may be specified for matching all IPv4 addresses, and ::/0 may be specified for matching all IPv6 addresses.
keepalive: Option<u32>An interval in seconds, between 1 and 65535 inclusive, of how often to send an authenticated empty packet to the peer for the purpose of keeping a stateful firewall or NAT mapping valid persistently. Optional.
keys: Option<WireGuardPeerKey>Define keys to use for the WireGuard peers.
Trait Implementations
sourceimpl Clone for WireGuardPeer
impl Clone for WireGuardPeer
sourcefn clone(&self) -> WireGuardPeer
fn clone(&self) -> WireGuardPeer
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more
sourceimpl Debug for WireGuardPeer
impl Debug for WireGuardPeer
sourceimpl Default for WireGuardPeer
impl Default for WireGuardPeer
sourcefn default() -> WireGuardPeer
fn default() -> WireGuardPeer
Returns the “default value” for a type. Read more
sourceimpl<'de> Deserialize<'de> for WireGuardPeer
impl<'de> Deserialize<'de> for WireGuardPeer
sourcefn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl PartialEq<WireGuardPeer> for WireGuardPeer
impl PartialEq<WireGuardPeer> for WireGuardPeer
sourcefn eq(&self, other: &WireGuardPeer) -> bool
fn eq(&self, other: &WireGuardPeer) -> bool
This method tests for self and other values to be equal, and is used
by ==. Read more
sourcefn ne(&self, other: &WireGuardPeer) -> bool
fn ne(&self, other: &WireGuardPeer) -> bool
This method tests for !=.
sourceimpl Serialize for WireGuardPeer
impl Serialize for WireGuardPeer
impl Eq for WireGuardPeer
impl StructuralEq for WireGuardPeer
impl StructuralPartialEq for WireGuardPeer
Auto Trait Implementations
impl RefUnwindSafe for WireGuardPeer
impl Send for WireGuardPeer
impl Sync for WireGuardPeer
impl Unpin for WireGuardPeer
impl UnwindSafe for WireGuardPeer
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into)Uses borrowed data to replace owned data, usually by cloning. Read more