pub struct CaptionCue {
pub timeline_range: TimeRange,
pub text: TextContent,
pub speaker: Option<String>,
pub style: Option<String>,
}Expand description
Text shown over one timeline interval.
Fields§
§timeline_range: TimeRangeWhen the cue shows. Non-empty and not before zero.
text: TextContentThe text, a string or runs; \n starts a line. Non-empty, at most
MAX_TEXT_CONTENT_BYTES bytes. Run times are from the cue’s start and lie within it.
speaker: Option<String>Who says it, as the source names them (a WebVTT voice), at most 64 bytes. A track style of that name applies when the cue names no style.
style: Option<String>The name of one of the track’s styles, applied over its style.
Implementations§
Source§impl CaptionCue
impl CaptionCue
Sourcepub fn new(timeline_range: TimeRange, text: impl Into<TextContent>) -> Self
pub fn new(timeline_range: TimeRange, text: impl Into<TextContent>) -> Self
A cue showing text over timeline_range, with no speaker or style.
Trait Implementations§
Source§impl Clone for CaptionCue
impl Clone for CaptionCue
Source§impl Debug for CaptionCue
impl Debug for CaptionCue
Source§impl<'de> Deserialize<'de> for CaptionCue
impl<'de> Deserialize<'de> for CaptionCue
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
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 CaptionCue
impl PartialEq for CaptionCue
Source§impl Serialize for CaptionCue
impl Serialize for CaptionCue
impl StructuralPartialEq for CaptionCue
Auto Trait Implementations§
impl Freeze for CaptionCue
impl RefUnwindSafe for CaptionCue
impl Send for CaptionCue
impl Sync for CaptionCue
impl Unpin for CaptionCue
impl UnsafeUnpin for CaptionCue
impl UnwindSafe for CaptionCue
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