pub struct NulError<T> { /* private fields */ }Expand description
An error returned from CStrArgument::try_into_cstr to indicate that a null byte
was found before the last byte in the string.
Implementations§
Source§impl<T> NulError<T>
impl<T> NulError<T>
Sourcepub fn nul_position(&self) -> usize
pub fn nul_position(&self) -> usize
Returns the position of the null byte in the string.
Sourcepub fn into_inner(self) -> T
pub fn into_inner(self) -> T
Returns the original string.
Trait Implementations§
Source§impl<T: Debug> Error for NulError<T>
impl<T: Debug> Error for NulError<T>
Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
impl<T: Copy> Copy for NulError<T>
impl<T: Eq> Eq for NulError<T>
impl<T> StructuralPartialEq for NulError<T>
Auto Trait Implementations§
impl<T> Freeze for NulError<T>where
T: Freeze,
impl<T> RefUnwindSafe for NulError<T>where
T: RefUnwindSafe,
impl<T> Send for NulError<T>where
T: Send,
impl<T> Sync for NulError<T>where
T: Sync,
impl<T> Unpin for NulError<T>where
T: Unpin,
impl<T> UnwindSafe for NulError<T>where
T: UnwindSafe,
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