Struct tokenizers::decoders::byte_fallback::ByteFallback
source · #[non_exhaustive]pub struct ByteFallback { /* private fields */ }
Expand description
ByteFallback is a simple trick which converts tokens looking like <0x61>
to pure bytes, and attempts to make them into a string. If the tokens
cannot be decoded you will get � instead for each inconvertable byte token
Implementations§
source§impl ByteFallback
impl ByteFallback
Trait Implementations§
source§impl Clone for ByteFallback
impl Clone for ByteFallback
source§fn clone(&self) -> ByteFallback
fn clone(&self) -> ByteFallback
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 ByteFallback
impl Debug for ByteFallback
source§impl Decoder for ByteFallback
impl Decoder for ByteFallback
source§impl Default for ByteFallback
impl Default for ByteFallback
source§fn default() -> ByteFallback
fn default() -> ByteFallback
Returns the “default value” for a type. Read more
source§impl<'de> Deserialize<'de> for ByteFallback
impl<'de> Deserialize<'de> for ByteFallback
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 From<ByteFallback> for DecoderWrapper
impl From<ByteFallback> for DecoderWrapper
source§fn from(from: ByteFallback) -> Self
fn from(from: ByteFallback) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for ByteFallback
impl RefUnwindSafe for ByteFallback
impl Send for ByteFallback
impl Sync for ByteFallback
impl Unpin for ByteFallback
impl UnwindSafe for ByteFallback
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