Struct Translate
pub struct Translate { pub from: String, pub to: String }
How to translate characters when decoding
The order matters. The first character of the from field is translated to the first character
of the to field. The second to the second. Etc.
See Specification for more information.
Fields
from: StringCharacters to translate from
to: StringCharacters to translate to
Trait Implementations
impl Clone for Translate
fn clone(&self) -> Translate
impl Debug for Translate
fn fmt(&self, f: &mut Formatter<'_>) -> Result
Auto Trait Implementations
impl Freeze for Translate
impl RefUnwindSafe for Translate
impl Send for Translate
impl Sync for Translate
impl Unpin for Translate
impl UnsafeUnpin for Translate
impl UnwindSafe for Translate
Blanket Implementations
impl<T> Any for Translate
where
T: 'static + ?Sized,
fn type_id(&self) -> TypeId
impl<T> Borrow<T> for Translate
where
T: ?Sized,
fn borrow(&self) -> &T
impl<T> BorrowMut<T> for Translate
where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
impl<T> CloneToUninit for Translate
where
T: Clone,
unsafe fn clone_to_uninit(&self, dest: *mut u8)
impl<T> From<T> for Translate
fn from(t: T) -> TReturns the argument unchanged.
impl<T> ToOwned for Translate
where
T: Clone,
type Owned = T;fn to_owned(&self) -> Tfn clone_into(&self, target: &mut T)
impl<T, U> Into<U> for Translate
where
U: From<T>,
fn into(self) -> UCalls
U::from(self).That is, this conversion is whatever the implementation of
[From]<T> for Uchooses to do.
impl<T, U> TryFrom<U> for Translate
where
U: Into<T>,
type Error = Infallible;fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
impl<T, U> TryInto<U> for Translate
where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error;fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>