pub enum Translation {
Character(char),
String(Cow<'static, str>),
None,
}
Expand description
The translation for a single character/codepoint.
Variants§
Character(char)
A single unicode character.
String(Cow<'static, str>)
A string.
None
This suggests that the translation is an empty string. You can get this when the input character is a control character, surrogate, combining character (e.g diacritics), private use character, byte order character, or any invalid unicode value (e.g beyond char::MAX
).
Trait Implementations§
Source§impl Add<Translation> for String
impl Add<Translation> for String
Source§impl AddAssign<Translation> for String
impl AddAssign<Translation> for String
Source§fn add_assign(&mut self, translation: Translation)
fn add_assign(&mut self, translation: Translation)
Performs the
+=
operation. Read moreSource§impl Clone for Translation
impl Clone for Translation
Source§fn clone(&self) -> Translation
fn clone(&self) -> Translation
Returns a copy 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 Translation
impl Debug for Translation
Source§impl Display for Translation
impl Display for Translation
Source§impl From<Translation> for Cow<'static, str>
impl From<Translation> for Cow<'static, str>
Source§fn from(translation: Translation) -> Self
fn from(translation: Translation) -> Self
Converts to this type from the input type.
Source§impl Hash for Translation
impl Hash for Translation
Source§impl<S> PartialEq<S> for Translation
Checks if this Translation
is similar with another string.
impl<S> PartialEq<S> for Translation
Checks if this Translation
is similar with another string.
This comparison is case-insensitive.
Source§impl PartialEq for Translation
impl PartialEq for Translation
impl StructuralPartialEq for Translation
Auto Trait Implementations§
impl Freeze for Translation
impl RefUnwindSafe for Translation
impl Send for Translation
impl Sync for Translation
impl Unpin for Translation
impl UnwindSafe for Translation
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