Struct wireguard_uapi::xplatform::set::Peer [−][src]
Documentation of each field comes from: https://www.wireguard.com/xplatform/#configuration-protocol
Fields
public_key: [u8; 32]
The value for this key should be a lowercase hex-encoded public key of a new peer entry, which this command adds. The same public key value may not repeat during a single message.
remove: Option<bool>
This key/value combo is only valid in a set operation, in which case it indicates that the previously added peer entry should be removed from the interface.
update_only: Option<bool>
This key/value combo is only valid in a set operation, in which case it causes the operation only occurs if the peer already exists as part of the interface.
The value for this key should be a lowercase hex-encoded preshared-key of the previously added peer entry. The value may be an all zero string in the case of a set operation, in which case it indicates that the preshared-key should be removed.
endpoint: Option<SocketAddr>
The value for this key is either IP:port for IPv4 or [IP]:port for IPv6, indicating the endpoint of the previously added peer entry.
persistent_keepalive_interval: Option<u16>
The value for this is a decimal-string integer corresponding to the persistent keepalive interval of the previously added peer entry. The value 0 disables it.
replace_allowed_ips: Option<bool>
This key/value combo is only valid in a set operation, in which case it indicates that the subsequent allowed IPs (perhaps an empty list) should replace any existing ones of the previously added peer entry, rather than append to the existing allowed IPs list.
allowed_ips: Vec<AllowedIp>
The value for this is IP/cidr, indicating a new added allowed IP entry for the previously added peer entry. If an identical value already exists as part of a prior peer, the allowed IP entry will be removed from that peer and added to this peer.
Implementations
impl Peer
[src]
pub fn from_public_key(public_key: [u8; 32]) -> Self
[src]
Trait Implementations
impl Clone for Peer
[src]
impl Debug for Peer
[src]
impl Display for Peer
[src]
impl PartialEq<Peer> for Peer
[src]
impl StructuralPartialEq for Peer
[src]
Auto Trait Implementations
impl RefUnwindSafe for Peer
impl Send for Peer
impl Sync for Peer
impl Unpin for Peer
impl UnwindSafe for Peer
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,