pub struct Peer {
pub public_key: [u8; 32],
pub preshared_key: [u8; 32],
pub endpoint: Option<SocketAddr>,
pub persistent_keepalive_interval: u16,
pub last_handshake_time: Duration,
pub rx_bytes: u64,
pub tx_bytes: u64,
pub allowed_ips: Vec<AllowedIp>,
pub protocol_version: u32,
}
Fields§
§public_key: [u8; 32]
§endpoint: Option<SocketAddr>
§persistent_keepalive_interval: u16
§last_handshake_time: Duration
§rx_bytes: u64
§tx_bytes: u64
§allowed_ips: Vec<AllowedIp>
§protocol_version: u32
Trait Implementations§
Source§impl TryFrom<AttrHandle<'_, GenlBuffer<WgPeerAttribute, Buffer>, Nlattr<WgPeerAttribute, Buffer>>> for Peer
impl TryFrom<AttrHandle<'_, GenlBuffer<WgPeerAttribute, Buffer>, Nlattr<WgPeerAttribute, Buffer>>> for Peer
Source§type Error = ParseDeviceError
type Error = ParseDeviceError
The type returned in the event of a conversion error.
Source§fn try_from(
handle: AttrHandle<'_, GenlBuffer<WgPeerAttribute, Buffer>, Nlattr<WgPeerAttribute, Buffer>>,
) -> Result<Self, Self::Error>
fn try_from( handle: AttrHandle<'_, GenlBuffer<WgPeerAttribute, Buffer>, Nlattr<WgPeerAttribute, Buffer>>, ) -> Result<Self, Self::Error>
Performs the conversion.
impl Eq for Peer
impl StructuralPartialEq for Peer
Auto Trait Implementations§
impl Freeze for Peer
impl RefUnwindSafe for Peer
impl Send for Peer
impl Sync for Peer
impl Unpin for Peer
impl UnwindSafe for Peer
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