pub enum OutgoingMessage {
Welcome {
peer_id: String,
},
PeerStatusChanged(PeerStatus),
StartSession {
peer_id: String,
session_id: String,
offer: Option<String>,
},
SessionStarted {
peer_id: String,
session_id: String,
},
EndSession(EndSessionMessage),
Peer(PeerMessage),
List {
producers: Vec<Peer>,
},
ListConsumers {
consumers: Vec<Peer>,
},
Error {
details: String,
},
}
Expand description
Messages sent from the server to peers
Variants§
Welcome
Welcoming message, sets the Peer ID linked to a new connection
PeerStatusChanged(PeerStatus)
Notifies listeners that a peer status has changed
StartSession
Instructs a peer to generate an offer or an answer and inform about the session ID
SessionStarted
Let consumer know that the requested session is starting with the specified identifier
EndSession(EndSessionMessage)
Signals that the session the peer was in was ended
Peer(PeerMessage)
Messages directly forwarded from one peer to another
List
Provides the current list of producers
ListConsumers
Provides the current list of consumers (awaiting a session request)
Error
Notifies that an error occurred with the peer’s current session
Trait Implementations§
Source§impl Debug for OutgoingMessage
impl Debug for OutgoingMessage
Source§impl<'de> Deserialize<'de> for OutgoingMessage
impl<'de> Deserialize<'de> for OutgoingMessage
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for OutgoingMessage
impl PartialEq for OutgoingMessage
Source§impl Serialize for OutgoingMessage
impl Serialize for OutgoingMessage
impl Eq for OutgoingMessage
impl StructuralPartialEq for OutgoingMessage
Auto Trait Implementations§
impl Freeze for OutgoingMessage
impl RefUnwindSafe for OutgoingMessage
impl Send for OutgoingMessage
impl Sync for OutgoingMessage
impl Unpin for OutgoingMessage
impl UnwindSafe for OutgoingMessage
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