pub enum Segment {
Show 13 variants
Text(String),
LineBreak,
Bold(Vec<Segment>),
Italic(Vec<Segment>),
Underline(Vec<Segment>),
Strike(Vec<Segment>),
Color {
rgb: (u8, u8, u8),
children: Vec<Segment>,
},
Font {
family: Option<String>,
size: Option<f32>,
children: Vec<Segment>,
},
Voice {
name: String,
children: Vec<Segment>,
},
Class {
name: String,
children: Vec<Segment>,
},
Karaoke {
cs: u32,
children: Vec<Segment>,
},
Timestamp {
offset_us: i64,
},
Raw(String),
}Expand description
One inline element of a cue body.
Variants§
Text(String)
LineBreak
Bold(Vec<Segment>)
Italic(Vec<Segment>)
Underline(Vec<Segment>)
Strike(Vec<Segment>)
Color
Font
Voice
WebVTT <v Speaker>...</v>.
Class
WebVTT <c.classname>...</c>.
Karaoke
ASS {\k<cs>} — the following text is highlighted for cs centiseconds.
The children slice is the text under this karaoke beat (until the next
\k override).
Timestamp
WebVTT inline timestamp <00:00:01.500>.
Raw(String)
Fallback for override tags we don’t model explicitly. Carries the textual source verbatim so a re-emit to the same format stays faithful.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Segment
impl RefUnwindSafe for Segment
impl Send for Segment
impl Sync for Segment
impl Unpin for Segment
impl UnsafeUnpin for Segment
impl UnwindSafe for Segment
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