Struct SSAInfo

Source
pub struct SSAInfo {
Show 16 fields pub title: Option<String>, pub original_script: Option<String>, pub original_translation: Option<String>, pub original_editing: Option<String>, pub original_timing: Option<String>, pub synch_point: Option<String>, pub script_update_by: Option<String>, pub update_details: Option<String>, pub script_type: Option<String>, pub collisions: Option<String>, pub play_res_y: Option<u32>, pub play_res_x: Option<u32>, pub play_depth: Option<u32>, pub timer: Option<f32>, pub wrap_style: Option<u8>, pub additional_fields: HashMap<String, String>,
}
Expand description

SSAInfo contains headers and general information about the script.

Fields§

§title: Option<String>

Description of the script.

§original_script: Option<String>

Original author(s) of the script.

§original_translation: Option<String>

Original translator of the dialogue.

§original_editing: Option<String>

Original script editor(s).

§original_timing: Option<String>

Whoever timed the original script

§synch_point: Option<String>

Description of where in the video the script should begin playback.

§script_update_by: Option<String>

Names of any other subtitling groups who edited the original script.

§update_details: Option<String>

The details of any updates to the original script - made by other subtitling groups

§script_type: Option<String>

The SSA script format version.

§collisions: Option<String>

Determines how subtitles are moved, when automatically preventing onscreen collisions. Allowed values:

  • Normal: SSA will attempt to position subtitles in the position specified by the “margins”. However, subtitles can be shifted vertically to prevent onscreen collisions. With “normal” collision prevention, the subtitles will “stack up” one above the other - but they will always be positioned as close the vertical (bottom) margin as possible - filling in “gaps” in other subtitles if one large enough is available.
  • Reverse: Subtitles will be shifted upwards to make room for subsequent overlapping subtitles. This means the subtitles can nearly always be read top-down - but it also means that the first subtitle can appear halfway up the screen before the subsequent overlapping subtitles appear. It can use a lot of screen area.
§play_res_y: Option<u32>

The height of the screen used by the script’s author(s) when playing the script.

§play_res_x: Option<u32>

The width of the screen used by the script’s author(s) when playing the script.

§play_depth: Option<u32>

The color depth used by the script’s author(s) when playing the script.

§timer: Option<f32>

The Timer Speed for the script, as percentage. So 100 == 100%.

§wrap_style: Option<u8>

Defines the default wrapping style. Allowed values are:

  • 0: smart wrapping, lines are evenly broken
  • 1: end-of-line word wrapping, only \N breaks
  • 2: no word wrapping, \n \N both breaks
  • 3: same as 0, but lower line gets wider
§additional_fields: HashMap<String, String>

Additional fields that aren’t covered by the ASS spec.

Trait Implementations§

Source§

impl Clone for SSAInfo

Source§

fn clone(&self) -> SSAInfo

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 SSAInfo

Source§

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

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

impl Default for SSAInfo

Source§

fn default() -> SSAInfo

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

impl<'de> Deserialize<'de> for SSAInfo

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl PartialEq for SSAInfo

Source§

fn eq(&self, other: &SSAInfo) -> 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 Serialize for SSAInfo

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl Eq for SSAInfo

Source§

impl StructuralPartialEq for SSAInfo

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.
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,