pub enum Formality {
Default,
More,
Less,
PreferMore,
PreferLess,
}
Expand description
Sets whether the translated text should lean towards formal or informal language.
This feature currently only works for target languages
DE
(German),
FR
(French),
IT
(Italian),
ES
(Spanish),
NL
(Dutch),
PL
(Polish),
PT-PT
,
PT-BR
(Portuguese)
and RU
(Russian).
Setting this parameter with a target language that does not support formality will fail,
unless one of the prefer_...
options are used.
Possible options are:
* default
(default)
* more
- for a more formal language
* less
- for a more informal language
* prefer_more
- for a more formal language if available, otherwise fallback to default formality
* prefer_less
- for a more informal language if available, otherwise fallback to default formality
Variants§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Formality
impl<'de> Deserialize<'de> for Formality
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Ord for Formality
impl Ord for Formality
Source§impl PartialOrd for Formality
impl PartialOrd for Formality
impl Copy for Formality
impl Eq for Formality
impl StructuralPartialEq for Formality
Auto Trait Implementations§
impl Freeze for Formality
impl RefUnwindSafe for Formality
impl Send for Formality
impl Sync for Formality
impl Unpin for Formality
impl UnwindSafe for Formality
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.