Struct wireguard_uapi::linux::set::Peer [−][src]
Fields
public_key: &'a [u8; 32]
flags: Vec<WgPeerF>
all zeros to remove
endpoint: Option<&'a SocketAddr>
persistent_keepalive_interval: Option<u16>
0 to disable
allowed_ips: Vec<AllowedIp<'a>>
protocol_version: Option<u32>
should not be set or used at all by most users of this API, as the most recent protocol will be used when this is unset. Otherwise, must be set to 1.
Implementations
impl<'a> Peer<'a>
[src]
pub fn from_public_key(public_key: &'a [u8; 32]) -> Self
[src]
pub fn flags(self, flags: Vec<WgPeerF>) -> Self
[src]
pub fn preshared_key(self, preshared_key: &'a [u8; 32]) -> Self
[src]
pub fn endpoint(self, endpoint: &'a SocketAddr) -> Self
[src]
pub fn persistent_keepalive_interval(
self,
persistent_keepalive_interval: u16
) -> Self
[src]
self,
persistent_keepalive_interval: u16
) -> Self
pub fn allowed_ips(self, allowed_ips: Vec<AllowedIp<'a>>) -> Self
[src]
pub fn protocol_version(self, protocol_version: u32) -> Self
[src]
Trait Implementations
Auto Trait Implementations
impl<'a> RefUnwindSafe for Peer<'a>
impl<'a> Send for Peer<'a>
impl<'a> Sync for Peer<'a>
impl<'a> Unpin for Peer<'a>
impl<'a> UnwindSafe for Peer<'a>
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, 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>,