#[non_exhaustive]pub struct Romanization {
pub romanized_text: String,
pub detected_language_code: String,
/* private fields */
}Expand description
A single romanization 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.romanized_text: StringRomanized text. If an error occurs during romanization, this field might be excluded from the response.
detected_language_code: StringThe ISO-639 language code of source text in the initial request, detected automatically, if no source language was passed within the initial request. If the source language was passed, auto-detection of the language does not occur and this field is empty.
Implementations§
Source§impl Romanization
impl Romanization
pub fn new() -> Self
Sourcepub fn set_romanized_text<T: Into<String>>(self, v: T) -> Self
pub fn set_romanized_text<T: Into<String>>(self, v: T) -> Self
Sets the value of romanized_text.
§Example
ⓘ
let x = Romanization::new().set_romanized_text("example");Sourcepub fn set_detected_language_code<T: Into<String>>(self, v: T) -> Self
pub fn set_detected_language_code<T: Into<String>>(self, v: T) -> Self
Sets the value of detected_language_code.
§Example
ⓘ
let x = Romanization::new().set_detected_language_code("example");Trait Implementations§
Source§impl Clone for Romanization
impl Clone for Romanization
Source§fn clone(&self) -> Romanization
fn clone(&self) -> Romanization
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 Romanization
impl Debug for Romanization
Source§impl Default for Romanization
impl Default for Romanization
Source§fn default() -> Romanization
fn default() -> Romanization
Returns the “default value” for a type. Read more
Source§impl Message for Romanization
impl Message for Romanization
Source§impl PartialEq for Romanization
impl PartialEq for Romanization
impl StructuralPartialEq for Romanization
Auto Trait Implementations§
impl Freeze for Romanization
impl RefUnwindSafe for Romanization
impl Send for Romanization
impl Sync for Romanization
impl Unpin for Romanization
impl UnsafeUnpin for Romanization
impl UnwindSafe for Romanization
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