Struct alloc::ffi::IntoStringError
source · [−]pub struct IntoStringError { /* private fields */ }Expand description
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
source
impl IntoStringError
sourcepub fn into_cstring(self) -> CString
1.7.0 · source
pub fn into_cstring(self) -> CString
1.7.0 · sourceConsumes this error, returning original CString which generated the
error.
pub fn utf8_error(&self) -> Utf8Error
1.7.0 · source
pub fn utf8_error(&self) -> Utf8Error
1.7.0 · sourceAccess the underlying UTF-8 error that was the cause of this error.
Trait Implementations
impl Clone for IntoStringError
source
impl Clone for IntoStringError
sourcefn clone(&self) -> IntoStringError
source
fn clone(&self) -> IntoStringError
sourceReturns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0 · source
fn clone_from(&mut self, source: &Self)
1.0.0 · sourcePerforms copy-assignment from source. Read more
impl Debug for IntoStringError
source
impl Debug for IntoStringError
sourceimpl Display for IntoStringError
1.7.0 · source
impl Display for IntoStringError
1.7.0 · sourceimpl PartialEq<IntoStringError> for IntoStringError
source
impl PartialEq<IntoStringError> for IntoStringError
sourcefn eq(&self, other: &IntoStringError) -> bool
source
fn eq(&self, other: &IntoStringError) -> bool
sourceThis method tests for self and other values to be equal, and is used
by ==. Read more
fn ne(&self, other: &IntoStringError) -> bool
source
fn ne(&self, other: &IntoStringError) -> bool
sourceThis method tests for !=.
impl Eq for IntoStringError
sourceimpl StructuralEq for IntoStringError
sourceimpl StructuralPartialEq for IntoStringError
sourceAuto Trait Implementations
impl RefUnwindSafe for IntoStringError
impl Send for IntoStringError
impl Sync for IntoStringError
impl Unpin for IntoStringError
impl UnwindSafe for IntoStringError
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
source
impl<T> BorrowMut<T> for T where
T: ?Sized,
sourcefn borrow_mut(&mut self) -> &mut T
const: unstable · source
fn borrow_mut(&mut self) -> &mut T
const: unstable · sourceMutably borrows from an owned value. Read more
impl<T> ToOwned for T where
T: Clone,
source
impl<T> ToOwned for T where
T: Clone,
sourcetype Owned = T
type Owned = T
The resulting type after obtaining ownership.
fn clone_into(&self, target: &mut T)
source
fn clone_into(&self, target: &mut T)
sourceUses borrowed data to replace owned data, usually by cloning. Read more