pub enum Format {
Srt,
Vtt,
Txt,
Json,
}Expand description
Output formats supported by omni-dev transcript … fetch.
Variants§
Srt
SubRip (.srt) — sequence-numbered cues with HH:MM:SS,mmm timecodes.
Vtt
WebVTT (.vtt) — WEBVTT header followed by cues with
HH:MM:SS.mmm timecodes.
Txt
Plain text — cue text only, one cue per line, no timing.
Json
JSON — the full Transcript struct serialised via serde.
Implementations§
Source§impl Format
impl Format
Sourcepub const ALL: &'static [Self]
pub const ALL: &'static [Self]
All variants in declaration order. Useful for help output and tests.
Sourcepub fn as_str(self) -> &'static str
pub fn as_str(self) -> &'static str
Lowercase, file-extension-style identifier ("srt", "vtt",
"txt", "json").
Sourcepub fn render(self, transcript: &Transcript) -> Result<String>
pub fn render(self, transcript: &Transcript) -> Result<String>
Render transcript to the format’s textual representation.
Errors only for Format::Json, which can fail if the transcript
contains values serde rejects (in practice unreachable for the
Transcript type, but the Result keeps the API uniform if other
formats grow fallible behaviour later).
Trait Implementations§
impl Copy for Format
impl Eq for Format
impl StructuralPartialEq for Format
Auto Trait Implementations§
impl Freeze for Format
impl RefUnwindSafe for Format
impl Send for Format
impl Sync for Format
impl Unpin for Format
impl UnsafeUnpin for Format
impl UnwindSafe for Format
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.