pub enum FromBytesWithNulError {
InteriorNul {
position: usize,
},
NotNulTerminated,
}
An error indicating that a nul byte was not in the expected position.
The slice used to create a CStr must have one and only one nul byte, positioned at the end.
This error is created by the CStr::from_bytes_with_nul method. See its documentation for more.
use std::ffi::{CStr, FromBytesWithNulError};
let _: FromBytesWithNulError = CStr::from_bytes_with_nul(b"f\0oo").unwrap_err();InteriorNul
Data provided contains an interior nul byte at byte position.
position: usizeThe position of the interior nul byte.
NotNulTerminated
Data provided is not nul terminated.
impl Clone for FromBytesWithNulError
fn clone(&self) -> FromBytesWithNulError
fn clone_from(&mut self, source: &Self)
source. Read more
impl Debug for FromBytesWithNulError
fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>
impl Display for FromBytesWithNulError
fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>
impl Error for FromBytesWithNulError
fn source(&self) -> Option<&(dyn Error + 'static)>
fn description(&self) -> &str
fn cause(&self) -> Option<&dyn Error>
fn provide<'a>(&'a self, request: &mut Request<'a>)
error_generic_member_access #99301)
impl PartialEq for FromBytesWithNulError
fn eq(&self, other: &FromBytesWithNulError) -> bool
self and other values to be equal, and is used by ==.fn ne(&self, other: &Rhs) -> bool
!=. The default implementation is almost always sufficient, and should not be overridden without very good reason.impl Copy for FromBytesWithNulError
impl Eq for FromBytesWithNulError
impl StructuralPartialEq for FromBytesWithNulError
impl Freeze for FromBytesWithNulError
impl RefUnwindSafe for FromBytesWithNulError
impl Send for FromBytesWithNulError
impl Sync for FromBytesWithNulError
impl Unpin for FromBytesWithNulError
impl UnwindSafe for FromBytesWithNulError
impl<T> Any for Twhere
T: 'static + ?Sized,impl<T> Borrow<T> for Twhere
T: ?Sized,impl<T> BorrowMut<T> for Twhere
T: ?Sized,impl<T> CloneToUninit for Twhere
T: Clone,unsafe fn clone_to_uninit(&self, dest: *mut u8)
clone_to_uninit #126799)
impl<T> From<T> for T
fn from(t: T) -> T
Returns the argument unchanged.
impl<T, U> Into<U> for Twhere
U: From<T>,fn into(self) -> U
Calls U::from(self).
That is, this conversion is whatever the implementation of From<T> for U chooses to do.
impl<T> ToOwned for Twhere
T: Clone,type Owned = T
fn to_owned(&self) -> T
fn clone_into(&self, target: &mut T)
impl<T> ToString for Twhere
T: Display + ?Sized,impl<T, U> TryFrom<U> for Twhere
U: Into<T>,type Error = Infallible
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
impl<T, U> TryInto<U> for Twhere
U: TryFrom<T>,
© 2010 The Rust Project Developers
Licensed under the Apache License, Version 2.0 or the MIT license, at your option.
https://doc.rust-lang.org/std/ffi/c_str/enum.FromBytesWithNulError.html