pub struct TokenTranslator {
tokens: Option<&'static Map<u16, &'static str>>,
}
Expand description
A struct that translates tokens to strings Essentially a wrapper around a static map that is generated at build time.
Fields§
§tokens: Option<&'static Map<u16, &'static str>>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TokenTranslator
impl RefUnwindSafe for TokenTranslator
impl Send for TokenTranslator
impl Sync for TokenTranslator
impl Unpin for TokenTranslator
impl UnwindSafe for TokenTranslator
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more