pub struct PeerEvent {
pub peer: ActrId,
pub relayed: Option<bool>,
}Expand description
Peer-scoped event payload for transport hooks.
Used by WebSocket and WebRTC hook callbacks to identify the remote peer
involved in the state change. For WebRTC, relayed reports whether the
selected ICE candidate pair traversed a TURN relay; for WebSocket the
field is always None (not applicable).
Fields§
§peer: ActrIdRemote peer identity.
relayed: Option<bool>Some(true) if the WebRTC connection is TURN-relayed, Some(false) for
a direct peer-to-peer connection. Always None for WebSocket events.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for PeerEvent
impl RefUnwindSafe for PeerEvent
impl Send for PeerEvent
impl Sync for PeerEvent
impl Unpin for PeerEvent
impl UnsafeUnpin for PeerEvent
impl UnwindSafe for PeerEvent
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