pub struct DecodeError { /* private fields */ }
Expand description
The error returned by zalgo_decode
if a string can not be decoded.
Implementations§
Source§impl DecodeError
impl DecodeError
Sourcepub fn cause_was_empty_string(&self) -> bool
pub fn cause_was_empty_string(&self) -> bool
Returns whether the error happened because the given string was empty, and not because the decoding resulted in invalid UTF-8.
Sourcepub fn backtrace(&self) -> &Backtrace
pub fn backtrace(&self) -> &Backtrace
Returns a backtrace to where the error was created.
The backtrace was captured with Backtrace::capture
, see it for more information
on how to make it show information when printed.
Sourcepub fn to_utf8_error(&self) -> Option<Utf8Error>
pub fn to_utf8_error(&self) -> Option<Utf8Error>
If the error happened because the decoding resulted in invalid UTF-8,
this function returns the Utf8Error
that was created in the process.
Sourcepub fn into_from_utf8_error(self) -> Option<FromUtf8Error>
pub fn into_from_utf8_error(self) -> Option<FromUtf8Error>
If the error happened because the decoding resulted in invalid UTF-8,
this function converts this error into the FromUtf8Error
that was created in the process.
Trait Implementations§
Source§impl Debug for DecodeError
impl Debug for DecodeError
Source§impl Display for DecodeError
impl Display for DecodeError
Source§impl Error for DecodeError
impl Error for DecodeError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns 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()
Auto Trait Implementations§
impl !Freeze for DecodeError
impl RefUnwindSafe for DecodeError
impl Send for DecodeError
impl Sync for DecodeError
impl Unpin for DecodeError
impl UnwindSafe for DecodeError
Blanket Implementations§
Source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
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
Source§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
Source§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Returns the layout of the type.
Source§impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
Source§unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
Returns whether the given value has been niched. Read more
Source§fn resolve_niched(out: Place<NichedOption<T, N1>>)
fn resolve_niched(out: Place<NichedOption<T, N1>>)
Writes data to
out
indicating that a T
is niched.