Struct utf8_chars::ReadCharError
source · [−]pub struct ReadCharError { /* private fields */ }
Expand description
A structure, containing read bytes, and an io::Error
.
The io::Error
is an actual I/O error if some occurred,
or a synthetic error with either the UnexpectedEof
kind if a multi-byte char was unexpectedly terminated,
either the InvalidData
kind if no actual I/O error occurred, but read byte sequence was not recognised as a valid UTF-8.
Implementations
sourceimpl ReadCharError
impl ReadCharError
sourcepub fn as_bytes(&self) -> &[u8]ⓘNotable traits for &'_ mut [u8]impl<'_> Write for &'_ mut [u8]impl<'_> Read for &'_ [u8]
pub fn as_bytes(&self) -> &[u8]ⓘNotable traits for &'_ mut [u8]impl<'_> Write for &'_ mut [u8]impl<'_> Read for &'_ [u8]
A byte sequence, representing an invalid or incomplete UTF-8-encoded char.
sourcepub fn as_io_error(&self) -> &Error
pub fn as_io_error(&self) -> &Error
Returns a reference to the I/O error.
sourcepub fn into_io_error(self) -> Error
pub fn into_io_error(self) -> Error
Consumes the ReadCharError
, returning the I/O error.
Trait Implementations
sourceimpl Debug for ReadCharError
impl Debug for ReadCharError
sourceimpl Display for ReadCharError
impl Display for ReadCharError
sourceimpl Error for ReadCharError
impl Error for ReadCharError
sourcefn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
sourcefn backtrace(&self) -> Option<&Backtrace>
fn backtrace(&self) -> Option<&Backtrace>
backtrace
)Returns a stack backtrace, if available, of where this error occurred. Read more
1.0.0 · sourcefn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
sourceimpl From<ReadCharError> for Error
impl From<ReadCharError> for Error
sourcefn from(e: ReadCharError) -> Error
fn from(e: ReadCharError) -> Error
Converts to this type from the input type.
Auto Trait Implementations
impl !RefUnwindSafe for ReadCharError
impl Send for ReadCharError
impl Sync for ReadCharError
impl Unpin for ReadCharError
impl !UnwindSafe for ReadCharError
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more