pub struct FromUtf8Error<A: Array<Item = u8>> { /* private fields */ }
Expand description
A possible error value when creating a SmallString
from a byte array.
This type is the error type for the from_buf
method on SmallString
.
Implementations§
Source§impl<A: Array<Item = u8>> FromUtf8Error<A>
impl<A: Array<Item = u8>> FromUtf8Error<A>
Sourcepub fn as_bytes(&self) -> &[u8]
pub fn as_bytes(&self) -> &[u8]
Returns the slice of [u8]
bytes that were attempted to convert to a SmallString
.
Sourcepub fn into_buf(self) -> A
pub fn into_buf(self) -> A
Returns the byte array that was attempted to convert into a SmallString
.
Sourcepub fn utf8_error(&self) -> Utf8Error
pub fn utf8_error(&self) -> Utf8Error
Returns the Utf8Error
to get more details about the conversion failure.
Trait Implementations§
Auto Trait Implementations§
impl<A> Freeze for FromUtf8Error<A>where
A: Freeze,
impl<A> RefUnwindSafe for FromUtf8Error<A>where
A: RefUnwindSafe,
impl<A> Send for FromUtf8Error<A>where
A: Send,
impl<A> Sync for FromUtf8Error<A>where
A: Sync,
impl<A> Unpin for FromUtf8Error<A>where
A: Unpin,
impl<A> UnwindSafe for FromUtf8Error<A>where
A: UnwindSafe,
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