webvtt_parser

Struct VttCueSettings

Source
pub struct VttCueSettings {
    pub vertical: Option<Vertical>,
    pub line: Option<NumberOrPercentage>,
    pub position: Option<u8>,
    pub size: Option<u8>,
    pub align: Option<Align>,
}
Expand description

Cue settings are optional components used to position where the cue payload text will be displayed over the video. This includes whether the text is displayed horizontally or vertically. There can be zero or more of them, and they can be used in any order so long as each setting is used no more than once.

Fields§

§vertical: Option<Vertical>§line: Option<NumberOrPercentage>

Specifies where text appears vertically. If vertical is set, line specifies where text appears horizontally. Value can be a line number:

  • The line height is the height of the first line of the cue as it appears on the video.
  • Positive numbers indicate top down.
  • Negative numbers indicate bottom up.

Or value can be a percentage:

  • Must be an integer (i.e., no decimals) between 0 and 100 inclusive.
  • Must be followed by a percent sign (%).
§position: Option<u8>

Specifies where the text will appear horizontally. If vertical is set, position specifies where the text will appear vertically. Value is percentage.

§size: Option<u8>

Specifies the width of the text area. If vertical is set, size specifies the height of the text area. Value is percentage.

§align: Option<Align>

Specifies the alignment of the text. Text is aligned within the space given by the size cue setting if it is set.

Trait Implementations§

Source§

impl Clone for VttCueSettings

Source§

fn clone(&self) -> VttCueSettings

Returns a copy of the value. Read more
1.0.0 · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Debug for VttCueSettings

Source§

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

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

impl Display for VttCueSettings

Source§

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

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

impl PartialEq for VttCueSettings

Source§

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

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

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

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Copy for VttCueSettings

Source§

impl Eq for VttCueSettings

Source§

impl StructuralPartialEq for VttCueSettings

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, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. 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> ToString for T
where T: Display + ?Sized,

Source§

default fn to_string(&self) -> String

Converts the given value to a String. 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.