#[non_exhaustive]pub struct RecognizeResponse {
pub results: Vec<SpeechRecognitionResult>,
pub metadata: Option<RecognitionResponseMetadata>,
/* private fields */
}Expand description
Response message for the Recognize method.
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.results: Vec<SpeechRecognitionResult>Sequential list of transcription results corresponding to sequential portions of audio.
metadata: Option<RecognitionResponseMetadata>Metadata about the recognition.
Implementations§
Source§impl RecognizeResponse
impl RecognizeResponse
pub fn new() -> Self
Sourcepub fn set_results<T, V>(self, v: T) -> Self
pub fn set_results<T, V>(self, v: T) -> Self
Sourcepub fn set_metadata<T>(self, v: T) -> Selfwhere
T: Into<RecognitionResponseMetadata>,
pub fn set_metadata<T>(self, v: T) -> Selfwhere
T: Into<RecognitionResponseMetadata>,
Sourcepub fn set_or_clear_metadata<T>(self, v: Option<T>) -> Selfwhere
T: Into<RecognitionResponseMetadata>,
pub fn set_or_clear_metadata<T>(self, v: Option<T>) -> Selfwhere
T: Into<RecognitionResponseMetadata>,
Sets or clears the value of metadata.
§Example
ⓘ
use google_cloud_speech_v2::model::RecognitionResponseMetadata;
let x = RecognizeResponse::new().set_or_clear_metadata(Some(RecognitionResponseMetadata::default()/* use setters */));
let x = RecognizeResponse::new().set_or_clear_metadata(None::<RecognitionResponseMetadata>);Trait Implementations§
Source§impl Clone for RecognizeResponse
impl Clone for RecognizeResponse
Source§fn clone(&self) -> RecognizeResponse
fn clone(&self) -> RecognizeResponse
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 RecognizeResponse
impl Debug for RecognizeResponse
Source§impl Default for RecognizeResponse
impl Default for RecognizeResponse
Source§fn default() -> RecognizeResponse
fn default() -> RecognizeResponse
Returns the “default value” for a type. Read more
Source§impl Message for RecognizeResponse
impl Message for RecognizeResponse
Source§impl PartialEq for RecognizeResponse
impl PartialEq for RecognizeResponse
impl StructuralPartialEq for RecognizeResponse
Auto Trait Implementations§
impl Freeze for RecognizeResponse
impl RefUnwindSafe for RecognizeResponse
impl Send for RecognizeResponse
impl Sync for RecognizeResponse
impl Unpin for RecognizeResponse
impl UnwindSafe for RecognizeResponse
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