#[non_exhaustive]pub struct Text {
pub renditions: BTreeMap<String, TextConfig>,
}Expand description
Information about the text (caption/subtitle) tracks in the catalog.
This struct contains a map of renditions, typically one per language.
Marked #[non_exhaustive] so additional optional fields can be added without
bumping the major version. External callers start from Text::default and
fill in what they need (insert for renditions); struct-literal
construction (with or without ..base) is not available outside this crate.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.renditions: BTreeMap<String, TextConfig>A map of track name to rendition configuration. This is not an array so it will work with JSON Merge Patch. We use a BTreeMap so keys are sorted alphabetically for some deterministic behavior.
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Text
impl<'de> Deserialize<'de> for Text
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 Text
Auto Trait Implementations§
impl Freeze for Text
impl RefUnwindSafe for Text
impl Send for Text
impl Sync for Text
impl Unpin for Text
impl UnsafeUnpin for Text
impl UnwindSafe for Text
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