Struct os_str_bytes::EncodingError
source · [−]pub struct EncodingError(_);
👎Deprecated:
use OsStrBytes::assert_from_raw_bytes
or OsStringBytes::assert_from_raw_vec
instead, or enable the ‘checked_conversions’ feature
Expand description
The error that occurs when a byte sequence is not representable in the platform encoding.
Result::unwrap
should almost always be called on results containing
this error. It should be known whether or not byte sequences are
properly encoded for the platform, since the module-level
documentation discourages using encoded bytes in
interchange. Results are returned primarily to make panicking behavior
explicit.
On Unix, this error is never returned, but OsStrExt
or
OsStringExt
should be used instead if that needs to be guaranteed.
Trait Implementations
sourceimpl Clone for EncodingError
impl Clone for EncodingError
sourcefn clone(&self) -> EncodingError
fn clone(&self) -> EncodingError
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl Debug for EncodingError
impl Debug for EncodingError
sourceimpl Display for EncodingError
impl Display for EncodingError
sourceimpl Error for EncodingError
impl Error for EncodingError
1.30.0 · 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
1.0.0 · sourcefn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
sourceimpl PartialEq<EncodingError> for EncodingError
impl PartialEq<EncodingError> for EncodingError
sourcefn eq(&self, other: &EncodingError) -> bool
fn eq(&self, other: &EncodingError) -> bool
impl Eq for EncodingError
impl StructuralEq for EncodingError
impl StructuralPartialEq for EncodingError
Auto Trait Implementations
impl RefUnwindSafe for EncodingError
impl Send for EncodingError
impl Sync for EncodingError
impl Unpin for EncodingError
impl UnwindSafe for EncodingError
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
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