pub struct FromNonEmptyUtf8Error { /* private fields */ }Available on crate features
std or alloc only.Expand description
Couples NonEmptyUtf8Error with the NonEmptyByteVec that is invalid UTF-8.
Implementations§
Source§impl FromNonEmptyUtf8Error
impl FromNonEmptyUtf8Error
Sourcepub const fn as_non_empty_bytes(&self) -> &NonEmptyBytes
pub const fn as_non_empty_bytes(&self) -> &NonEmptyBytes
Returns contained invalid UTF-8 bytes as NonEmptyBytes.
Sourcepub fn into_non_empty_bytes(self) -> NonEmptyByteVec
pub fn into_non_empty_bytes(self) -> NonEmptyByteVec
Returns the contained non-empty bytes.
Sourcepub const fn non_empty_error(&self) -> NonEmptyUtf8Error
pub const fn non_empty_error(&self) -> NonEmptyUtf8Error
Returns the underlying UTF-8 error.
Sourcepub fn recover(self) -> (NonEmptyUtf8Error, NonEmptyByteVec)
pub fn recover(self) -> (NonEmptyUtf8Error, NonEmptyByteVec)
Recovers the underlying UTF-8 error and the non-empty bytes.
This is the same as returning non_empty_error and into_non_empty_bytes.
Trait Implementations§
Source§impl Debug for FromNonEmptyUtf8Error
impl Debug for FromNonEmptyUtf8Error
Source§impl Display for FromNonEmptyUtf8Error
impl Display for FromNonEmptyUtf8Error
Source§impl Error for FromNonEmptyUtf8Error
impl Error for FromNonEmptyUtf8Error
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()
Source§impl From<FromNonEmptyUtf8Error> for FromMaybeEmptyUtf8Error
impl From<FromNonEmptyUtf8Error> for FromMaybeEmptyUtf8Error
Source§fn from(source: FromNonEmptyUtf8Error) -> Self
fn from(source: FromNonEmptyUtf8Error) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for FromNonEmptyUtf8Error
impl RefUnwindSafe for FromNonEmptyUtf8Error
impl Send for FromNonEmptyUtf8Error
impl Sync for FromNonEmptyUtf8Error
impl Unpin for FromNonEmptyUtf8Error
impl UnwindSafe for FromNonEmptyUtf8Error
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