#[non_exhaustive]pub enum ClientEvent {
Connected {
properties: Vec<(String, Amf0Value)>,
},
StreamCreated {
stream_id: u32,
},
Publishing,
Playing {
recorded: bool,
},
Media {
flv: Vec<u8>,
},
StreamEnded,
Error {
code: String,
description: String,
},
Closed,
}Expand description
Typed events ClientSession::handle_data surfaces.
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
Server accepted connect.
StreamCreated
Server allocated a stream id.
Publishing
Server accepted publish — session is now publishing.
Playing
Server accepted play (NetStream.Play.Start): media follows. Play mode only.
Fields
Media
One FLV chunk of played media: the payload of a single Audio(8)/Video(9)/Data-AMF0(18)
message as an FLV tag (+ PreviousTagSize), the very first chunk prefixed with the FLV
file header. Concatenating every chunk in order yields a valid FLV stream. Play mode only.
StreamEnded
The played stream ended: User Control Stream EOF (§6.7) or NetStream.Play.Stop /
NetStream.Play.Complete. Play mode only.
Error
Server returned an error.
Closed
Session closed.
Trait Implementations§
Source§impl Clone for ClientEvent
impl Clone for ClientEvent
Source§impl Debug for ClientEvent
impl Debug for ClientEvent
Source§impl PartialEq for ClientEvent
impl PartialEq for ClientEvent
impl StructuralPartialEq for ClientEvent
Auto Trait Implementations§
impl Freeze for ClientEvent
impl RefUnwindSafe for ClientEvent
impl Send for ClientEvent
impl Sync for ClientEvent
impl Unpin for ClientEvent
impl UnsafeUnpin for ClientEvent
impl UnwindSafe for ClientEvent
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