Struct aligned_media::Track
[−]
[src]
pub struct Track { pub track_type: TrackType, pub lang: Option<Language>, pub html: Option<String>, pub ext: ExtensionData, // some fields omitted }
An individual "track" of context. This might be a single subtitle in a single language, or a still image taken from a video
Fields
track_type: TrackType
lang: Option<Language>
The language stored in this track, represented as a two-letter ISO 639-1 code when possible, and a three-letter 639-3 code for languages not included in ISO 639-1. If this is omitted, then programs may assume that this track might be something like a still image from a video or an illustration, that provides context but contains no linguistic data.
html: Option<String>
Textual context, which should be valid HTML 5, optionally with embedded
tags like <b>
, <i>
and <br>
.
ext: ExtensionData
Application-specific extension data.
Methods
impl Track
[src]
fn with_type(track_type: TrackType) -> Track
[src]
Create a new track with the specified type. This is pretty much useless unless you also set some additional fields manually.
fn html<S: Into<String>>(lang: Language, html: S) -> Track
[src]
Create a new HTML track with specified language and content.
Trait Implementations
impl Clone for Track
[src]
fn clone(&self) -> Track
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more