pub trait CatalogExt: CatalogExt { }Expand description
An application’s catalog extension: a plain serde struct of extra root sections that are serialized as a flat union with the base media sections.
Implement it (no methods) on a struct of your own sections, then publish/consume a
Catalog<YourExt>:
use serde::{Deserialize, Serialize};
#[derive(Serialize, Deserialize, Clone, Default)]
struct Scte35Ext {
#[serde(skip_serializing_if = "Option::is_none")]
scte35: Option<Scte35>,
}
#[derive(Serialize, Deserialize, Clone, Default)]
struct Scte35 {
splice_id: u32,
}
impl hang::catalog::CatalogExt for Scte35Ext {}The unit type () is the no-extension case, so Catalog<()> is just the base media catalog.
The same extension rides the MSF catalog track, so this requires [moq_msf::CatalogExt];
that trait is blanket-implemented, so one impl CatalogExt is still all a caller writes.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".