pub struct PushWgpeer<Prev: Pusher> { /* private fields */ }Available on crate feature
wireguard only.Implementations§
Source§impl<Prev: Pusher> PushWgpeer<Prev>
impl<Prev: Pusher> PushWgpeer<Prev>
pub fn new(prev: Prev) -> Self
pub fn end_nested(self) -> Prev
pub fn push_public_key(self, value: &[u8]) -> Self
Set as all zeros to remove.
Sourcepub fn push_flags(self, value: u32) -> Self
pub fn push_flags(self, value: u32) -> Self
0 and/or WGPEER_F_REMOVE_ME if the specified peer should not exist
at the end of the operation, rather than added/updated and/or
WGPEER_F_REPLACE_ALLOWEDIPS if all current allowed IPs of this peer
should be removed prior to adding the list below and/or
WGPEER_F_UPDATE_ONLY if the peer should only be set if it already
exists.
Associated type: WgpeerFlags (enum)
Sourcepub fn push_endpoint(self, value: SocketAddr) -> Self
pub fn push_endpoint(self, value: SocketAddr) -> Self
struct sockaddr_in or struct sockaddr_in6
Sourcepub fn push_persistent_keepalive_interval(self, value: u16) -> Self
pub fn push_persistent_keepalive_interval(self, value: u16) -> Self
Set as 0 to disable.
pub fn push_last_handshake_time(self, value: KernelTimespec) -> Self
pub fn push_rx_bytes(self, value: u64) -> Self
pub fn push_tx_bytes(self, value: u64) -> Self
Sourcepub fn array_allowedips(self) -> PushArrayWgallowedip<Self>
pub fn array_allowedips(self) -> PushArrayWgallowedip<Self>
The index/type parameter is unused on SET_DEVICE operations and is
zero on GET_DEVICE operations.
Sourcepub fn push_protocol_version(self, value: u32) -> Self
pub fn push_protocol_version(self, value: u32) -> Self
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.
Trait Implementations§
Source§impl<Prev: Pusher> Drop for PushWgpeer<Prev>
impl<Prev: Pusher> Drop for PushWgpeer<Prev>
Source§impl<Prev: Pusher> Pusher for PushWgpeer<Prev>
impl<Prev: Pusher> Pusher for PushWgpeer<Prev>
Auto Trait Implementations§
impl<Prev> Freeze for PushWgpeer<Prev>where
Prev: Freeze,
impl<Prev> RefUnwindSafe for PushWgpeer<Prev>where
Prev: RefUnwindSafe,
impl<Prev> Send for PushWgpeer<Prev>where
Prev: Send,
impl<Prev> Sync for PushWgpeer<Prev>where
Prev: Sync,
impl<Prev> Unpin for PushWgpeer<Prev>where
Prev: Unpin,
impl<Prev> UnsafeUnpin for PushWgpeer<Prev>where
Prev: UnsafeUnpin,
impl<Prev> UnwindSafe for PushWgpeer<Prev>where
Prev: UnwindSafe,
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