#[non_exhaustive]pub struct InlineResult {
pub transcript: Option<BatchRecognizeResults>,
pub vtt_captions: String,
pub srt_captions: String,
/* private fields */
}Expand description
Final results returned inline in the recognition response.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.transcript: Option<BatchRecognizeResults>The transcript for the audio file.
vtt_captions: StringThe transcript for the audio file as VTT formatted captions. This is
populated only when VTT output is requested.
srt_captions: StringThe transcript for the audio file as SRT formatted captions. This is
populated only when SRT output is requested.
Implementations§
Source§impl InlineResult
impl InlineResult
pub fn new() -> Self
Sourcepub fn set_transcript<T>(self, v: T) -> Selfwhere
T: Into<BatchRecognizeResults>,
pub fn set_transcript<T>(self, v: T) -> Selfwhere
T: Into<BatchRecognizeResults>,
Sets the value of transcript.
§Example
ⓘ
use google_cloud_speech_v2::model::BatchRecognizeResults;
let x = InlineResult::new().set_transcript(BatchRecognizeResults::default()/* use setters */);Sourcepub fn set_or_clear_transcript<T>(self, v: Option<T>) -> Selfwhere
T: Into<BatchRecognizeResults>,
pub fn set_or_clear_transcript<T>(self, v: Option<T>) -> Selfwhere
T: Into<BatchRecognizeResults>,
Sets or clears the value of transcript.
§Example
ⓘ
use google_cloud_speech_v2::model::BatchRecognizeResults;
let x = InlineResult::new().set_or_clear_transcript(Some(BatchRecognizeResults::default()/* use setters */));
let x = InlineResult::new().set_or_clear_transcript(None::<BatchRecognizeResults>);Sourcepub fn set_vtt_captions<T: Into<String>>(self, v: T) -> Self
pub fn set_vtt_captions<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_srt_captions<T: Into<String>>(self, v: T) -> Self
pub fn set_srt_captions<T: Into<String>>(self, v: T) -> Self
Trait Implementations§
Source§impl Clone for InlineResult
impl Clone for InlineResult
Source§fn clone(&self) -> InlineResult
fn clone(&self) -> InlineResult
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for InlineResult
impl Debug for InlineResult
Source§impl Default for InlineResult
impl Default for InlineResult
Source§fn default() -> InlineResult
fn default() -> InlineResult
Returns the “default value” for a type. Read more
Source§impl Message for InlineResult
impl Message for InlineResult
Source§impl PartialEq for InlineResult
impl PartialEq for InlineResult
impl StructuralPartialEq for InlineResult
Auto Trait Implementations§
impl Freeze for InlineResult
impl RefUnwindSafe for InlineResult
impl Send for InlineResult
impl Sync for InlineResult
impl Unpin for InlineResult
impl UnwindSafe for InlineResult
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