pub enum Wgpeer<'a> {
PublicKey(&'a [u8]),
PresharedKey(&'a [u8]),
Flags(u32),
Endpoint(SocketAddr),
PersistentKeepaliveInterval(u16),
LastHandshakeTime(KernelTimespec),
RxBytes(u64),
TxBytes(u64),
Allowedips(IterableArrayWgallowedip<'a>),
ProtocolVersion(u32),
}Available on crate feature
wireguard only.Variants§
PublicKey(&'a [u8])
Set as all zeros to remove.
Flags(u32)
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)
Endpoint(SocketAddr)
struct sockaddr_in or struct sockaddr_in6
PersistentKeepaliveInterval(u16)
Set as 0 to disable.
LastHandshakeTime(KernelTimespec)
RxBytes(u64)
TxBytes(u64)
Allowedips(IterableArrayWgallowedip<'a>)
The index/type parameter is unused on SET_DEVICE operations and is
zero on GET_DEVICE operations.
ProtocolVersion(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§
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for Wgpeer<'a>
impl<'a> RefUnwindSafe for Wgpeer<'a>
impl<'a> Send for Wgpeer<'a>
impl<'a> Sync for Wgpeer<'a>
impl<'a> Unpin for Wgpeer<'a>
impl<'a> UnsafeUnpin for Wgpeer<'a>
impl<'a> UnwindSafe for Wgpeer<'a>
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