pub struct OwnedVtt {
pub slugs: HashMap<String, String>,
pub style: Option<String>,
pub cues: Vec<OwnedVttCue>,
}
Expand description
(web)VTT — Web Video Text Tracks This struct represents a parsed VTT file. It contains a list of cues and optional metadata.
Make sure that this version is used when you need to own the data. If its possible please use
the Vtt
struct instead.
Fields§
§slugs: HashMap<String, String>
Top level key-value metadata pairs that might be populated at the very top of the subtitles file. For example:
WEBVTT
Kind: captions
Language: en
style: Option<String>
Optional global css style can be populated at the very top of the file. If it is present it might be applied globally to all cues.
For example:
STYLE
::cue {
background-image: linear-gradient(to bottom, dimgray, lightgray);
color: papayawhip;
font-size: 50px;
text-align: center;
font-family: monospace;
}
cues: Vec<OwnedVttCue>
A list of cues that are present in the file. Each cue contains a start and end time, text and optional cue settings.
For example:
WEBVTT
00:00.000 --> 00:05.000
Hey subtitle one
Implementations§
Trait Implementations§
impl ASubtitle for OwnedVtt
impl Eq for OwnedVtt
impl StructuralPartialEq for OwnedVtt
Auto Trait Implementations§
impl Freeze for OwnedVtt
impl RefUnwindSafe for OwnedVtt
impl Send for OwnedVtt
impl Sync for OwnedVtt
impl Unpin for OwnedVtt
impl UnwindSafe for OwnedVtt
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)