pub struct Catalog {
pub video: Video,
pub audio: Audio,
pub user: Option<User>,
pub chat: Option<Chat>,
pub preview: Option<Track>,
}Expand description
A catalog track, created by a broadcaster to describe the tracks available in a broadcast.
Fields§
§video: VideoVideo track information with multiple renditions.
Contains a map of video track renditions that the viewer can choose from based on their preferences (resolution, bitrate, codec, etc).
audio: AudioAudio track information with multiple renditions.
Contains a map of audio track renditions that the viewer can choose from based on their preferences (codec, bitrate, language, etc).
user: Option<User>User metadata for the broadcaster
chat: Option<Chat>Chat track metadata
preview: Option<Track>Preview information about the broadcast
Implementations§
Source§impl Catalog
impl Catalog
Sourcepub const DEFAULT_NAME: &str = "catalog.json"
pub const DEFAULT_NAME: &str = "catalog.json"
The default name for the catalog track.
Sourcepub fn from_slice(v: &[u8]) -> Result<Self>
pub fn from_slice(v: &[u8]) -> Result<Self>
Parse a catalog from a slice of bytes.
Sourcepub fn from_reader(reader: impl Read) -> Result<Self>
pub fn from_reader(reader: impl Read) -> Result<Self>
Parse a catalog from a reader.
Sourcepub fn to_string_pretty(&self) -> Result<String>
pub fn to_string_pretty(&self) -> Result<String>
Serialize the catalog to a pretty string.
pub fn default_track() -> Track
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Catalog
impl<'de> Deserialize<'de> for Catalog
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
impl StructuralPartialEq for Catalog
Auto Trait Implementations§
impl Freeze for Catalog
impl RefUnwindSafe for Catalog
impl Send for Catalog
impl Sync for Catalog
impl Unpin for Catalog
impl UnsafeUnpin for Catalog
impl UnwindSafe for Catalog
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