pub struct ConnInfo {
pub node_id: NodeId,
pub peer_identity: Identity,
pub role: ServerRole,
}Expand description
ConnInfo describes a peer that has connected to (or disconnected from) the server.
It is delivered to the on_connect and on_disconnect callbacks registered on
ServerBuilder.
Fields§
§node_id: NodeIdThe 32-byte node identifier of the peer, derived from its Ed25519 public key.
peer_identity: IdentityThe full Ed25519 identity of the peer (public key + node ID).
role: ServerRoleThe role the peer advertised during the handshake.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ConnInfo
impl RefUnwindSafe for ConnInfo
impl Send for ConnInfo
impl Sync for ConnInfo
impl Unpin for ConnInfo
impl UnsafeUnpin for ConnInfo
impl UnwindSafe for ConnInfo
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