#[non_exhaustive]pub enum RoomEvent {
Show 37 variants
ParticipantConnected(RemoteParticipant),
ParticipantDisconnected(RemoteParticipant),
LocalTrackPublished {
publication: LocalTrackPublication,
track: LocalTrack,
participant: LocalParticipant,
},
LocalTrackUnpublished {
publication: LocalTrackPublication,
participant: LocalParticipant,
},
LocalTrackSubscribed {
track: LocalTrack,
},
TrackSubscribed {
track: RemoteTrack,
publication: RemoteTrackPublication,
participant: RemoteParticipant,
},
TrackUnsubscribed {
track: RemoteTrack,
publication: RemoteTrackPublication,
participant: RemoteParticipant,
},
TrackSubscriptionFailed {
participant: RemoteParticipant,
error: TrackError,
track_sid: TrackSid,
},
TrackPublished {
publication: RemoteTrackPublication,
participant: RemoteParticipant,
},
TrackUnpublished {
publication: RemoteTrackPublication,
participant: RemoteParticipant,
},
TrackMuted {
participant: Participant,
publication: TrackPublication,
},
TrackUnmuted {
participant: Participant,
publication: TrackPublication,
},
RoomMetadataChanged {
old_metadata: String,
metadata: String,
},
ParticipantMetadataChanged {
participant: Participant,
old_metadata: String,
metadata: String,
},
ParticipantNameChanged {
participant: Participant,
old_name: String,
name: String,
},
ParticipantAttributesChanged {
participant: Participant,
changed_attributes: HashMap<String, String>,
},
ActiveSpeakersChanged {
speakers: Vec<Participant>,
},
ConnectionQualityChanged {
quality: ConnectionQuality,
participant: Participant,
},
DataReceived {
payload: Arc<Vec<u8>>,
topic: Option<String>,
kind: DataPacketKind,
participant: Option<RemoteParticipant>,
},
TranscriptionReceived {
participant: Option<Participant>,
track_publication: Option<TrackPublication>,
segments: Vec<TranscriptionSegment>,
},
SipDTMFReceived {
code: u32,
digit: Option<String>,
participant: Option<RemoteParticipant>,
},
ChatMessage {
message: ChatMessage,
participant: Option<RemoteParticipant>,
},
ByteStreamOpened {
reader: TakeCell<ByteStreamReader>,
topic: String,
participant_identity: ParticipantIdentity,
},
TextStreamOpened {
reader: TakeCell<TextStreamReader>,
topic: String,
participant_identity: ParticipantIdentity,
},
StreamHeaderReceived {
header: Header,
participant_identity: String,
},
StreamChunkReceived {
chunk: Chunk,
participant_identity: String,
},
StreamTrailerReceived {
trailer: Trailer,
participant_identity: String,
},
E2eeStateChanged {
participant: Participant,
state: EncryptionState,
},
ConnectionStateChanged(ConnectionState),
Connected {
participants_with_tracks: Vec<(RemoteParticipant, Vec<RemoteTrackPublication>)>,
},
Disconnected {
reason: DisconnectReason,
},
Reconnecting,
Reconnected,
DataChannelBufferedAmountLowThresholdChanged {
kind: DataPacketKind,
threshold: u64,
},
RoomUpdated {
room: RoomInfo,
},
Moved {
room: RoomInfo,
},
ParticipantsUpdated {
participants: Vec<Participant>,
},
}
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
ParticipantConnected(RemoteParticipant)
ParticipantDisconnected(RemoteParticipant)
LocalTrackPublished
LocalTrackUnpublished
LocalTrackSubscribed
Fields
§
track: LocalTrack
TrackSubscribed
TrackUnsubscribed
TrackSubscriptionFailed
TrackPublished
TrackUnpublished
TrackMuted
TrackUnmuted
RoomMetadataChanged
ParticipantMetadataChanged
ParticipantNameChanged
ParticipantAttributesChanged
ActiveSpeakersChanged
Fields
§
speakers: Vec<Participant>
ConnectionQualityChanged
DataReceived
TranscriptionReceived
Fields
§
participant: Option<Participant>
§
track_publication: Option<TrackPublication>
§
segments: Vec<TranscriptionSegment>
SipDTMFReceived
ChatMessage
ByteStreamOpened
TextStreamOpened
StreamHeaderReceived
👎Deprecated: Use high-level data streams API instead.
Fields
StreamChunkReceived
👎Deprecated: Use high-level data streams API instead.
Fields
StreamTrailerReceived
👎Deprecated: Use high-level data streams API instead.
Fields
E2eeStateChanged
ConnectionStateChanged(ConnectionState)
Connected
Fields
§
participants_with_tracks: Vec<(RemoteParticipant, Vec<RemoteTrackPublication>)>
Initial participants & their tracks prior to joining the room We’re not returning this directly inside Room::connect because it is unlikely to be used
Disconnected
Fields
§
reason: DisconnectReason
Reconnecting
Reconnected
DataChannelBufferedAmountLowThresholdChanged
RoomUpdated
Moved
ParticipantsUpdated
Fields
§
participants: Vec<Participant>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for RoomEvent
impl !RefUnwindSafe for RoomEvent
impl Send for RoomEvent
impl Sync for RoomEvent
impl Unpin for RoomEvent
impl !UnwindSafe for RoomEvent
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