pub struct SubtitleTitleInfo {
pub language_tags: Vec<String>,
pub language: Language,
pub raw_title: Option<String>,
pub title: Option<String>,
pub copy: i32,
pub title_first: bool,
}Expand description
Outcome of parse_basic_subtitle / mirrors C# SubtitleTitleInfo
minimum surface (the fields ParseBasicSubtitle actually populates).
ParseBasicSubtitle only sets TitleFirst (always false),
LanguageTags, and Language. RawTitle, Title, Copy are
left at their default values (None, None, 0).
Fields§
Mirrors C# LanguageTags. Always lowercased per
tag.Value.ToLower() in ParseSubtitleLanguageInformation.
language: LanguageMirrors C# Language. Language::Unknown when the file
carried no resolvable language code.
raw_title: Option<String>Mirrors C# RawTitle. None when no title segment was parsed
(e.g. ParseBasicSubtitle short-circuit, or
ParseSubtitleLanguageInformation falling back to
ParseBasicSubtitle).
title: Option<String>Mirrors C# Title. Either the bare RawTitle or the
(?<title>.+) capture from SubtitleTitleRegex once the
trailing copy-number is stripped.
copy: i32Mirrors C# Copy. Zero when no trailing copy-number suffix
was found.
title_first: boolMirrors C# TitleFirst. true when the parsed title segment
precedes any tag/iso_code segment in the filename (i.e. when
tags1 is empty in C#’s regex).
Trait Implementations§
Source§impl Clone for SubtitleTitleInfo
impl Clone for SubtitleTitleInfo
Source§fn clone(&self) -> SubtitleTitleInfo
fn clone(&self) -> SubtitleTitleInfo
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more