pub struct EncodingError(/* private fields */);
OsStrBytes::assert_from_raw_bytes
or OsStringBytes::assert_from_raw_vec
instead, or enable the ‘checked_conversions’ featureExpand 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§
Source§impl Clone for EncodingError
impl Clone for EncodingError
Source§fn clone(&self) -> EncodingError
fn clone(&self) -> EncodingError
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for EncodingError
impl Debug for EncodingError
Source§impl Display for EncodingError
impl Display for EncodingError
Source§impl Error for EncodingError
impl Error for EncodingError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
Source§impl PartialEq for EncodingError
impl PartialEq for EncodingError
impl Eq for EncodingError
impl StructuralPartialEq for EncodingError
Auto Trait Implementations§
impl Freeze for EncodingError
impl RefUnwindSafe for EncodingError
impl Send for EncodingError
impl Sync for EncodingError
impl Unpin for EncodingError
impl UnwindSafe for EncodingError
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 0 bytes (uninhabited)