Struct smallstr::FromUtf8Error
source · [−]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
sourceimpl<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> 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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
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