pub enum Utf8FailureMode {
Lossy,
Fatal,
Continue,
}
Expand description
Type for specifying a StringAdapter
’s
behavior upon encountering non-UTF-8 data.
Variants§
Lossy
Lossily convert to UTF-8 (with
String::from_utf8_lossy
).
Fatal
Report an error and stop reading (return Some(Err(RcErr))
once
and then None
thereafter.
Continue
Report an error but attempt to continue (keep returning
Some(Err(RcErr))
until the it starts reading UTF-8 from the
source
again.
Trait Implementations§
Source§impl Clone for Utf8FailureMode
impl Clone for Utf8FailureMode
Source§fn clone(&self) -> Utf8FailureMode
fn clone(&self) -> Utf8FailureMode
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 Utf8FailureMode
impl Debug for Utf8FailureMode
Source§impl Default for Utf8FailureMode
impl Default for Utf8FailureMode
Source§fn default() -> Utf8FailureMode
fn default() -> Utf8FailureMode
Returns the “default value” for a type. Read more
impl Copy for Utf8FailureMode
Auto Trait Implementations§
impl Freeze for Utf8FailureMode
impl RefUnwindSafe for Utf8FailureMode
impl Send for Utf8FailureMode
impl Sync for Utf8FailureMode
impl Unpin for Utf8FailureMode
impl UnwindSafe for Utf8FailureMode
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