pub struct CaptionCue { /* private fields */ }Expand description
Immutable caption text active in the half-open interval [start, end).
Times use Duration precision. Text uses LF-separated nonblank lines, without
trailing LF, CR or control characters other than LF/tab. Markup is literal.
This type supplies content, not font selection, layout or a playback clock.
Implementations§
Source§impl CaptionCue
impl CaptionCue
Sourcepub fn new(
start: Duration,
end: Duration,
text: impl Into<String>,
) -> Result<Self, ValidationError>
pub fn new( start: Duration, end: Duration, text: impl Into<String>, ) -> Result<Self, ValidationError>
Validates increasing times and nonblank text of at most 64 KiB in UTF-8. Blank text lines and unsupported control characters are rejected.
Sourcepub fn start(&self) -> Duration
pub fn start(&self) -> Duration
Returns the inclusive cue start relative to the sampled frame’s clock.
Trait Implementations§
Source§impl Clone for CaptionCue
impl Clone for CaptionCue
Source§impl Debug for CaptionCue
impl Debug for CaptionCue
impl Eq for CaptionCue
Source§impl PartialEq for CaptionCue
impl PartialEq for CaptionCue
impl StructuralPartialEq for CaptionCue
Auto Trait Implementations§
impl Forget for CaptionCue
impl Freeze for CaptionCue
impl Move 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