pub enum Input<Msg: UserMsgPayload> {
InitHandshake {
with: PeerID,
mode: HandshakeMode,
strategy: HandshakeStrategy,
},
InitOpenOffer,
OpenOfferCreated(String),
Handshake {
from: PeerID,
event: HandshakeInput,
},
MessageReceived {
peer_from: PeerID,
data: MsgPayload<Msg>,
},
Send {
peer_to: PeerID,
data: MsgPayload<Msg>,
},
Broadcast {
data: MsgPayload<Msg>,
},
PeerLeaving {
peer: PeerID,
},
Leave,
TimerFired {
kind: Scheduled,
},
}Expand description
Common event that client FSM receives
Variants§
InitHandshake
Initiate a handshake with a known peer ID, choosing role and signaling mode.
InitOpenOffer
Bootstrap host initializes an open offer without knowing the joiner’s ID yet.
OpenOfferCreated(String)
Bootstrap host’s SDP offer was created by WebRTC.
Handshake
Receive handshake event from a known peer
MessageReceived
Receive abstract message
Send
Send abstract message to other peer
Broadcast
Send abstract message to all peers
Fields
§
data: MsgPayload<Msg>PeerLeaving
Receive peer leaving message
Leave
The local node initiates departure from the mesh
TimerFired
Driver-scheduled timer expired; FSM dispatches by kind.
Trait Implementations§
Auto Trait Implementations§
impl<Msg> Freeze for Input<Msg>where
Msg: Freeze,
impl<Msg> RefUnwindSafe for Input<Msg>where
Msg: RefUnwindSafe,
impl<Msg> Send for Input<Msg>where
Msg: Send,
impl<Msg> Sync for Input<Msg>where
Msg: Sync,
impl<Msg> Unpin for Input<Msg>where
Msg: Unpin,
impl<Msg> UnsafeUnpin for Input<Msg>where
Msg: UnsafeUnpin,
impl<Msg> UnwindSafe for Input<Msg>where
Msg: 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