Struct IntoStringError
pub struct IntoStringError { pub(in ::ffi::c_str) inner: CString, pub(in ::ffi::c_str) error: Utf8Error }
An error indicating invalid UTF-8 when converting a CString into a String.
CString is just a wrapper over a buffer of bytes with a nul terminator;
CString::into_string performs UTF-8 validation on those bytes and may
return this error.
This struct is created by [CString::into_string()]. See
its documentation for more.
Fields
inner: CStringerror: Utf8Error
Implementations
impl IntoStringError
fn into_cstring(self) -> CStringConsumes this error, returning original
CStringwhich generated the error.fn utf8_error(&self) -> Utf8ErrorAccess the underlying UTF-8 error that was the cause of this error.
Trait Implementations
impl Clone for IntoStringError
fn clone(&self) -> IntoStringError
impl Debug for IntoStringError
fn fmt(&self, f: &mut Formatter<'_>) -> Result
impl Display for IntoStringError
fn fmt(&self, f: &mut Formatter<'_>) -> Result
impl Eq for IntoStringError
fn assert_fields_are_eq(&self)
impl Error for IntoStringError
fn source(&self) -> Option<&dyn Error + 'static>
impl PartialEq for IntoStringError
fn eq(&self, other: &IntoStringError) -> bool
impl StructuralPartialEq for IntoStringError
Auto Trait Implementations
impl Freeze for IntoStringError
impl RefUnwindSafe for IntoStringError
impl Send for IntoStringError
impl Sync for IntoStringError
impl Unpin for IntoStringError
impl UnsafeUnpin for IntoStringError
impl UnwindSafe for IntoStringError
Blanket Implementations
impl<T> Any for IntoStringError
where
T: 'static + ?Sized,
fn type_id(&self) -> TypeId
impl<T> Borrow<T> for IntoStringError
where
T: ?Sized,
fn borrow(&self) -> &T
impl<T> BorrowMut<T> for IntoStringError
where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
impl<T> CloneToUninit for IntoStringError
where
T: Clone,
unsafe fn clone_to_uninit(&self, dest: *mut u8)
impl<T> From<T> for IntoStringError
fn from(t: T) -> TReturns the argument unchanged.
impl<T> SizeHint for IntoStringError
where
T: ?Sized,
fn lower_bound(&self) -> usizefn upper_bound(&self) -> Option<usize>
impl<T> SizedTypeProperties for IntoStringError
impl<T> ToOwned for IntoStringError
where
T: Clone,
type Owned = T;fn to_owned(&self) -> Tfn clone_into(&self, target: &mut T)
impl<T> ToString for IntoStringError
where
T: Display + ?Sized,
fn to_string(&self) -> String
impl<T, U> Into<U> for IntoStringError
where
U: From<T>,
fn into(self) -> UCalls
U::from(self).That is, this conversion is whatever the implementation of
[From]<T> for Uchooses to do.
impl<T, U> TryFrom<U> for IntoStringError
where
U: Into<T>,
type Error = Infallible;fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
impl<T, U> TryInto<U> for IntoStringError
where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error;fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>