Enum decancer::Translation
source · pub enum Translation {
Character(char),
String(&'static str),
None,
}Expand description
The translation for a single character/codepoint.
Variants§
Character(char)
A single unicode character.
String(&'static str)
An ASCII string slice.
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 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<'de> Deserialize<'de> for Translation
Available on crate feature serde only.
impl<'de> Deserialize<'de> for Translation
Available on crate feature
serde only.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 Display for Translation
impl Display for Translation
source§impl<S> PartialEq<S> for Translation
impl<S> PartialEq<S> for Translation
Checks if this Translation is similar into another string.
This comparison is case-insensitive.
source§impl PartialEq for Translation
impl PartialEq for Translation
source§fn eq(&self, other: &Translation) -> bool
fn eq(&self, other: &Translation) -> bool
This method tests for
self and other values to be equal, and is used
by ==.source§impl Serialize for Translation
Available on crate feature serde only.
impl Serialize for Translation
Available on crate feature
serde only.impl Copy for Translation
impl StructuralPartialEq for Translation
Auto Trait Implementations§
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