Struct utf8_command::StderrError
source · pub struct StderrError { /* private fields */ }
Expand description
The Output
’s stderr
field contained invalid UTF-8. Wraps a FromUtf8Error
.
use utf8_command::StderrError;
let invalid_utf8 = Vec::from(b"\xf0\x90"); // Incomplete 4-byte sequence.
let inner_err = String::from_utf8(invalid_utf8).unwrap_err();
let err = StderrError::from(inner_err);
assert_eq!(
err.to_string(),
"Stderr contained incomplete utf-8 byte sequence from index 0: \"�\""
);
Implementations§
source§impl StderrError
impl StderrError
sourcepub fn inner(&self) -> &FromUtf8Error
pub fn inner(&self) -> &FromUtf8Error
Get a reference to the inner FromUtf8Error
.
Trait Implementations§
source§impl Clone for StderrError
impl Clone for StderrError
source§fn clone(&self) -> StderrError
fn clone(&self) -> StderrError
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 StderrError
impl Debug for StderrError
source§impl Display for StderrError
impl Display for StderrError
source§impl Error for StderrError
impl Error for StderrError
1.30.0 · source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
1.0.0 · source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
source§impl From<FromUtf8Error> for StderrError
impl From<FromUtf8Error> for StderrError
source§fn from(inner: FromUtf8Error) -> Self
fn from(inner: FromUtf8Error) -> Self
Converts to this type from the input type.
source§impl From<StderrError> for Error
impl From<StderrError> for Error
source§fn from(value: StderrError) -> Self
fn from(value: StderrError) -> Self
Converts to this type from the input type.
source§impl From<StderrError> for FromUtf8Error
impl From<StderrError> for FromUtf8Error
source§fn from(value: StderrError) -> Self
fn from(value: StderrError) -> Self
Converts to this type from the input type.
source§impl PartialEq for StderrError
impl PartialEq for StderrError
source§fn eq(&self, other: &StderrError) -> bool
fn eq(&self, other: &StderrError) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Eq for StderrError
impl StructuralPartialEq for StderrError
Auto Trait Implementations§
impl Freeze for StderrError
impl RefUnwindSafe for StderrError
impl Send for StderrError
impl Sync for StderrError
impl Unpin for StderrError
impl UnwindSafe for StderrError
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