#[non_exhaustive]pub struct BatchRecognizeFileResult {
pub error: Option<Status>,
pub metadata: Option<RecognitionResponseMetadata>,
pub uri: String,
pub transcript: Option<BatchRecognizeResults>,
pub result: Option<Result>,
/* private fields */
}Expand description
Final results for a single file.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.error: Option<Status>Error if one was encountered.
metadata: Option<RecognitionResponseMetadata>§uri: StringDeprecated. Use cloud_storage_result.native_format_uri instead.
transcript: Option<BatchRecognizeResults>Deprecated. Use inline_result.transcript instead.
result: Option<Result>Implementations§
Source§impl BatchRecognizeFileResult
impl BatchRecognizeFileResult
pub fn new() -> Self
Sourcepub fn set_or_clear_error<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_error<T>(self, v: Option<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 = BatchRecognizeFileResult::new().set_or_clear_metadata(Some(RecognitionResponseMetadata::default()/* use setters */));
let x = BatchRecognizeFileResult::new().set_or_clear_metadata(None::<RecognitionResponseMetadata>);Sourcepub fn set_transcript<T>(self, v: T) -> Selfwhere
T: Into<BatchRecognizeResults>,
👎Deprecated
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 = BatchRecognizeFileResult::new().set_transcript(BatchRecognizeResults::default()/* use setters */);Sourcepub fn set_or_clear_transcript<T>(self, v: Option<T>) -> Selfwhere
T: Into<BatchRecognizeResults>,
👎Deprecated
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 = BatchRecognizeFileResult::new().set_or_clear_transcript(Some(BatchRecognizeResults::default()/* use setters */));
let x = BatchRecognizeFileResult::new().set_or_clear_transcript(None::<BatchRecognizeResults>);Sourcepub fn set_result<T: Into<Option<Result>>>(self, v: T) -> Self
pub fn set_result<T: Into<Option<Result>>>(self, v: T) -> Self
Sets the value of result.
Note that all the setters affecting result are mutually
exclusive.
§Example
use google_cloud_speech_v2::model::CloudStorageResult;
let x = BatchRecognizeFileResult::new().set_result(Some(
google_cloud_speech_v2::model::batch_recognize_file_result::Result::CloudStorageResult(CloudStorageResult::default().into())));Sourcepub fn cloud_storage_result(&self) -> Option<&Box<CloudStorageResult>>
pub fn cloud_storage_result(&self) -> Option<&Box<CloudStorageResult>>
The value of result
if it holds a CloudStorageResult, None if the field is not set or
holds a different branch.
Sourcepub fn set_cloud_storage_result<T: Into<Box<CloudStorageResult>>>(
self,
v: T,
) -> Self
pub fn set_cloud_storage_result<T: Into<Box<CloudStorageResult>>>( self, v: T, ) -> Self
Sets the value of result
to hold a CloudStorageResult.
Note that all the setters affecting result are
mutually exclusive.
§Example
use google_cloud_speech_v2::model::CloudStorageResult;
let x = BatchRecognizeFileResult::new().set_cloud_storage_result(CloudStorageResult::default()/* use setters */);
assert!(x.cloud_storage_result().is_some());
assert!(x.inline_result().is_none());Sourcepub fn inline_result(&self) -> Option<&Box<InlineResult>>
pub fn inline_result(&self) -> Option<&Box<InlineResult>>
The value of result
if it holds a InlineResult, None if the field is not set or
holds a different branch.
Sourcepub fn set_inline_result<T: Into<Box<InlineResult>>>(self, v: T) -> Self
pub fn set_inline_result<T: Into<Box<InlineResult>>>(self, v: T) -> Self
Sets the value of result
to hold a InlineResult.
Note that all the setters affecting result are
mutually exclusive.
§Example
use google_cloud_speech_v2::model::InlineResult;
let x = BatchRecognizeFileResult::new().set_inline_result(InlineResult::default()/* use setters */);
assert!(x.inline_result().is_some());
assert!(x.cloud_storage_result().is_none());Trait Implementations§
Source§impl Clone for BatchRecognizeFileResult
impl Clone for BatchRecognizeFileResult
Source§fn clone(&self) -> BatchRecognizeFileResult
fn clone(&self) -> BatchRecognizeFileResult
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more