Struct IntoStringError

struct IntoStringError { ... }

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.

Implementations

impl IntoStringError

fn into_cstring(self: Self) -> CString

Consumes this error, returning original CString which generated the error.

fn utf8_error(self: &Self) -> Utf8Error

Access the underlying UTF-8 error that was the cause of this error.

impl Clone for IntoStringError

fn clone(self: &Self) -> IntoStringError

impl Debug for IntoStringError

fn fmt(self: &Self, f: &mut $crate::fmt::Formatter<'_>) -> $crate::fmt::Result

impl Display for IntoStringError

fn fmt(self: &Self, f: &mut fmt::Formatter<'_>) -> fmt::Result

impl Eq for IntoStringError

impl Error for IntoStringError

fn source(self: &Self) -> Option<&dyn core::error::Error + 'static>

impl Freeze for IntoStringError

impl PartialEq for IntoStringError

fn eq(self: &Self, other: &IntoStringError) -> bool

impl RefUnwindSafe for IntoStringError

impl Send for IntoStringError

impl StructuralPartialEq for IntoStringError

impl Sync for IntoStringError

impl Unpin for IntoStringError

impl UnwindSafe for IntoStringError

impl<T> Any for IntoStringError

fn type_id(self: &Self) -> TypeId

impl<T> Borrow for IntoStringError

fn borrow(self: &Self) -> &T

impl<T> BorrowMut for IntoStringError

fn borrow_mut(self: &mut Self) -> &mut T

impl<T> CloneToUninit for IntoStringError

unsafe fn clone_to_uninit(self: &Self, dest: *mut u8)

impl<T> From for IntoStringError

fn from(t: T) -> T

Returns the argument unchanged.

impl<T> ToOwned for IntoStringError

fn to_owned(self: &Self) -> T
fn clone_into(self: &Self, target: &mut T)

impl<T> ToString for IntoStringError

fn to_string(self: &Self) -> String

impl<T, U> Into for IntoStringError

fn into(self: Self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses to do.

impl<T, U> TryFrom for IntoStringError

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

impl<T, U> TryInto for IntoStringError

fn try_into(self: Self) -> Result<U, <U as TryFrom<T>>::Error>