#[non_exhaustive]pub struct TranslateTextResponse {
pub translations: Vec<Translation>,
pub glossary_translations: Vec<Translation>,
/* private fields */
}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.translations: Vec<Translation>Text translation responses with no glossary applied.
This field has the same length as
contents.
glossary_translations: Vec<Translation>Text translation responses if a glossary is provided in the request.
This can be the same as
translations
if no terms apply. This field has the same length as
contents.
Implementations§
Source§impl TranslateTextResponse
impl TranslateTextResponse
pub fn new() -> Self
Sourcepub fn set_translations<T, V>(self, v: T) -> Self
pub fn set_translations<T, V>(self, v: T) -> Self
Sets the value of translations.
§Example
ⓘ
use google_cloud_translation_v3::model::Translation;
let x = TranslateTextResponse::new()
.set_translations([
Translation::default()/* use setters */,
Translation::default()/* use (different) setters */,
]);Sourcepub fn set_glossary_translations<T, V>(self, v: T) -> Self
pub fn set_glossary_translations<T, V>(self, v: T) -> Self
Sets the value of glossary_translations.
§Example
ⓘ
use google_cloud_translation_v3::model::Translation;
let x = TranslateTextResponse::new()
.set_glossary_translations([
Translation::default()/* use setters */,
Translation::default()/* use (different) setters */,
]);Trait Implementations§
Source§impl Clone for TranslateTextResponse
impl Clone for TranslateTextResponse
Source§fn clone(&self) -> TranslateTextResponse
fn clone(&self) -> TranslateTextResponse
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 TranslateTextResponse
impl Debug for TranslateTextResponse
Source§impl Default for TranslateTextResponse
impl Default for TranslateTextResponse
Source§fn default() -> TranslateTextResponse
fn default() -> TranslateTextResponse
Returns the “default value” for a type. Read more
Source§impl Message for TranslateTextResponse
impl Message for TranslateTextResponse
Source§impl PartialEq for TranslateTextResponse
impl PartialEq for TranslateTextResponse
impl StructuralPartialEq for TranslateTextResponse
Auto Trait Implementations§
impl Freeze for TranslateTextResponse
impl RefUnwindSafe for TranslateTextResponse
impl Send for TranslateTextResponse
impl Sync for TranslateTextResponse
impl Unpin for TranslateTextResponse
impl UnsafeUnpin for TranslateTextResponse
impl UnwindSafe for TranslateTextResponse
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