pub enum FromUtf8WithNul {
Utf8(Utf8Error),
CStr(FromBytesWithNulError),
}Expand description
An error indicating that a nul byte was not in the expected position, or that there was invalid UTF-8.
The slice used to create a Utf8CStr must have one and only one nul byte, positioned at the end.
This error is created by the Utf8CStr::from_utf8_with_nul method. See its documentation for more.
Variants§
Utf8(Utf8Error)
The slice was not valid UTF-8.
CStr(FromBytesWithNulError)
The slice was not a valid C string.
Trait Implementations§
Source§impl Clone for FromUtf8WithNul
impl Clone for FromUtf8WithNul
Source§fn clone(&self) -> FromUtf8WithNul
fn clone(&self) -> FromUtf8WithNul
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for FromUtf8WithNul
impl Debug for FromUtf8WithNul
Source§impl Display for FromUtf8WithNul
impl Display for FromUtf8WithNul
Source§impl From<FromBytesWithNulError> for FromUtf8WithNul
impl From<FromBytesWithNulError> for FromUtf8WithNul
Source§fn from(value: FromBytesWithNulError) -> FromUtf8WithNul
fn from(value: FromBytesWithNulError) -> FromUtf8WithNul
Converts to this type from the input type.
Source§impl From<Utf8Error> for FromUtf8WithNul
impl From<Utf8Error> for FromUtf8WithNul
Source§fn from(value: Utf8Error) -> FromUtf8WithNul
fn from(value: Utf8Error) -> FromUtf8WithNul
Converts to this type from the input type.
Source§impl PartialEq for FromUtf8WithNul
impl PartialEq for FromUtf8WithNul
impl Eq for FromUtf8WithNul
impl StructuralPartialEq for FromUtf8WithNul
Auto Trait Implementations§
impl Freeze for FromUtf8WithNul
impl RefUnwindSafe for FromUtf8WithNul
impl Send for FromUtf8WithNul
impl Sync for FromUtf8WithNul
impl Unpin for FromUtf8WithNul
impl UnwindSafe for FromUtf8WithNul
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