#[non_exhaustive]pub enum ServerEvent {
Connected {
app: String,
},
Publish {
app: String,
stream_key: String,
stream_id: u32,
},
Media {
flv: Vec<u8>,
},
Eof,
}Expand description
Typed events ServerSession::handle_data surfaces to the caller.
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.
Connected
connect completed: the publisher’s requested app name (§7.2.1).
Publish
publish was accepted (stream key matched, or no key was
configured): the session is now Publishing.
Fields
Media
One FLV tag run is ready: the payload of a single Audio(8)/Video(9)/
Data-AMF0(18) message, converted to an FLV tag (+ PreviousTagSize).
The very first Media event of a session is prefixed with the FLV
file header, so concatenating every Media.flv in arrival order
yields a valid FLV byte stream feedable to transmux::FlvDemux.
Fields
Eof
The publisher ended the stream (deleteStream/FCUnpublish).
Trait Implementations§
Source§impl Clone for ServerEvent
impl Clone for ServerEvent
Source§fn clone(&self) -> ServerEvent
fn clone(&self) -> ServerEvent
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ServerEvent
impl Debug for ServerEvent
Source§impl<'de> Deserialize<'de> for ServerEvent
Available on crate feature serde only.
impl<'de> Deserialize<'de> for ServerEvent
Available on crate feature
serde only.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 ServerEvent
impl PartialEq for ServerEvent
Source§impl Serialize for ServerEvent
Available on crate feature serde only.
impl Serialize for ServerEvent
Available on crate feature
serde only.impl StructuralPartialEq for ServerEvent
Auto Trait Implementations§
impl Freeze for ServerEvent
impl RefUnwindSafe for ServerEvent
impl Send for ServerEvent
impl Sync for ServerEvent
impl Unpin for ServerEvent
impl UnsafeUnpin for ServerEvent
impl UnwindSafe for ServerEvent
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