Skip to main content

TtElement

Struct TtElement 

Source
#[non_exhaustive]
pub struct TtElement {
Show 33 fields pub xml_lang: Option<String>, pub xml_id: Option<String>, pub xml_space: Option<XmlSpace>, pub ttp_time_base: Option<String>, pub ttp_frame_rate: Option<String>, pub ttp_frame_rate_multiplier: Option<String>, pub ttp_tick_rate: Option<String>, pub ttp_sub_frame_rate: Option<String>, pub ttp_drop_mode: Option<String>, pub ttp_marker_mode: Option<String>, pub ttp_clock_mode: Option<String>, pub ttp_cell_resolution: Option<String>, pub ttp_pixel_aspect_ratio: Option<String>, pub ttp_display_aspect_ratio: Option<String>, pub ttp_profile: Option<String>, pub ttp_content_profiles: Option<String>, pub ttp_content_profile_combination: Option<String>, pub ttp_processor_profiles: Option<String>, pub ttp_processor_profile_combination: Option<String>, pub ttp_infer_processor_profile_method: Option<String>, pub ttp_infer_processor_profile_source: Option<String>, pub ttp_permit_feature_narrowing: Option<String>, pub ttp_permit_feature_widening: Option<String>, pub ttp_validation: Option<String>, pub ttp_validation_action: Option<String>, pub tts_extent: Option<String>, pub ittp_active_area: Option<String>, pub ittp_aspect_ratio: Option<String>, pub ittp_progressively_decodable: Option<String>, pub other_attributes: BTreeMap<(String, String), String>, pub head: Option<HeadElement>, pub body: Option<BodyElement>, pub text: Option<String>,
}
Expand description

The root <tt> element — TTML2 §8.1.1.

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.
§xml_lang: Option<String>

XML language, e.g. “en”.

§xml_id: Option<String>

XML id.

§xml_space: Option<XmlSpace>

XML space: “default” or “preserve”.

§ttp_time_base: Option<String>

ttp:timeBase — default “media”.

§ttp_frame_rate: Option<String>

ttp:frameRate — default 30.

§ttp_frame_rate_multiplier: Option<String>

ttp:frameRateMultiplier — default “1 1”.

§ttp_tick_rate: Option<String>

ttp:tickRate — default derived.

§ttp_sub_frame_rate: Option<String>

ttp:subFrameRate — default 1.

§ttp_drop_mode: Option<String>

ttp:dropMode — default “nonDrop”.

§ttp_marker_mode: Option<String>

ttp:markerMode — default “discontinuous”.

§ttp_clock_mode: Option<String>

ttp:clockMode — default “utc”.

§ttp_cell_resolution: Option<String>

ttp:cellResolution — default “32 15”.

§ttp_pixel_aspect_ratio: Option<String>

ttp:pixelAspectRatio — no default.

§ttp_display_aspect_ratio: Option<String>

ttp:displayAspectRatio — no default.

§ttp_profile: Option<String>

ttp:profile attribute (the simple profile designator).

§ttp_content_profiles: Option<String>

ttp:contentProfiles — space-separated designators or all(...).

§ttp_content_profile_combination: Option<String>

ttp:contentProfileCombination.

§ttp_processor_profiles: Option<String>

ttp:processorProfiles.

§ttp_processor_profile_combination: Option<String>

ttp:processorProfileCombination.

§ttp_infer_processor_profile_method: Option<String>

ttp:inferProcessorProfileMethod.

§ttp_infer_processor_profile_source: Option<String>

ttp:inferProcessorProfileSource.

§ttp_permit_feature_narrowing: Option<String>

ttp:permitFeatureNarrowing.

§ttp_permit_feature_widening: Option<String>

ttp:permitFeatureWidening.

§ttp_validation: Option<String>

ttp:validation.

§ttp_validation_action: Option<String>

ttp:validationAction.

§tts_extent: Option<String>

tts:extent on the root element.

§ittp_active_area: Option<String>

ittp:activeArea — IMSC extension (IMSC 1.1 §7.8.5).

§ittp_aspect_ratio: Option<String>

ittp:aspectRatio — IMSC extension (deprecated, IMSC 1.1 §7.8.1).

§ittp_progressively_decodable: Option<String>

ittp:progressivelyDecodable — IMSC extension (IMSC 1.1 §7.8.2).

§other_attributes: BTreeMap<(String, String), String>

Other attributes not covered explicitly (reserved for future extensions).

§head: Option<HeadElement>

Optional <head> child.

§body: Option<BodyElement>

Optional <body> child.

§text: Option<String>

Text content (if any) — should be empty per spec.

Implementations§

Source§

impl TtElement

Source

pub fn time_context(&self) -> TimeContext

Derive the time context from this element’s parameter attributes.

Trait Implementations§

Source§

impl Clone for TtElement

Source§

fn clone(&self) -> TtElement

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for TtElement

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for TtElement

Source§

fn default() -> TtElement

Returns the “default value” for a type. Read more
Source§

impl PartialEq for TtElement

Source§

fn eq(&self, other: &TtElement) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for TtElement

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.