Enum songbird::EventContext [−][src]
Information about which tracks or data fired an event.
Track
events may be local or global, and have no tracks
if fired on the global context via Driver::add_global_event
.
Variants (Non-exhaustive)
Track(&'a [(&'a TrackState, &'a TrackHandle)])
Track event context, passed to events created via TrackHandle::add_event
,
EventStore::add_event
, or relevant global events.
SpeakingStateUpdate(Speaking)
Speaking state update, typically describing how another voice user is transmitting audio data. Clients must send at least one such packet to allow SSRC/UserID matching.
Speaking state transition, describing whether a given source has started/stopped transmitting. This fires in response to a silent burst, or the first packet breaking such a burst.
Fields of SpeakingUpdate
Opus audio packet, received from another stream (detailed in packet
).
payload_offset
contains the true payload location within the raw packet’s payload()
,
if extensions or raw packet data are required.
if audio.len() == 0
, then this packet arrived out-of-order.
Fields of VoicePacket
audio: &'a Option<Vec<i16>>
Decoded audio from this packet.
packet: &'a Rtp
Raw RTP packet data.
Includes the SSRC (i.e., sender) of this packet.
payload_offset: usize
Byte index into the packet body (after headers) for where the payload begins.
payload_end_pad: usize
Number of bytes at the end of the packet to discard.
Telemetry/statistics packet, received from another stream (detailed in packet
).
payload_offset
contains the true payload location within the raw packet’s payload()
,
to allow manual decoding of Rtcp
packet bodies.
Fields of RtcpPacket
ClientConnect(ClientConnect)
Fired whenever a client connects to a call for the first time, allowing SSRC/UserID matching.
ClientDisconnect(ClientDisconnect)
Fired whenever a client disconnects.
Fires when this driver successfully connects to a voice channel.
Fires when this driver successfully reconnects after a network error.
Fires when this driver fails to connect to a voice channel.
Fires when this driver fails to reconnect to a voice channel after a network error.
Users will need to manually reconnect on receipt of this error.
SsrcKnown(u32)
Fires whenever the driver is assigned a new RTP SSRC by the voice server.
This typically fires alongside a DriverConnect, or a full DriverReconnect.
Implementations
impl EventContext<'_>
[src]
pub fn to_core_event(&self) -> Option<CoreEvent>
[src]
Retreive the event class for an event (i.e., when matching) an event against the registered listeners.
Trait Implementations
impl<'a> Clone for EventContext<'a>
[src]
fn clone(&self) -> EventContext<'a>
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<'a> Debug for EventContext<'a>
[src]
Auto Trait Implementations
impl<'a> !RefUnwindSafe for EventContext<'a>
impl<'a> Send for EventContext<'a>
impl<'a> Sync for EventContext<'a>
impl<'a> Unpin for EventContext<'a>
impl<'a> !UnwindSafe for EventContext<'a>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,
pub fn vzip(self) -> V
impl<T> WithSubscriber for T
[src]
pub fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
[src]
S: Into<Dispatch>,