Enum widestring::error::NulError
source · pub enum NulError<C> {
MissingNulTerminator(MissingNulTerminator),
ContainsNul(ContainsNul<C>),
}
Expand description
An error returned to indicate a problem with nul values occurred.
The error will either being a MissingNulTerminator
or ContainsNul
.
The error optionally returns the ownership of the invalid vector whenever a vector was owned.
Variants§
MissingNulTerminator(MissingNulTerminator)
A terminating nul value was missing.
ContainsNul(ContainsNul<C>)
An interior nul value was found.
Implementations§
Trait Implementations§
source§impl<C> Error for NulError<C>where
C: Debug + 'static,
impl<C> Error for NulError<C>where
C: Debug + 'static,
source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
1.0.0 · source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
source§impl<C> From<ContainsNul<C>> for NulError<C>
impl<C> From<ContainsNul<C>> for NulError<C>
source§fn from(value: ContainsNul<C>) -> Self
fn from(value: ContainsNul<C>) -> Self
Converts to this type from the input type.
source§impl<C> From<MissingNulTerminator> for NulError<C>
impl<C> From<MissingNulTerminator> for NulError<C>
source§fn from(value: MissingNulTerminator) -> Self
fn from(value: MissingNulTerminator) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl<C> Freeze for NulError<C>
impl<C> RefUnwindSafe for NulError<C>where
C: RefUnwindSafe,
impl<C> Send for NulError<C>where
C: Send,
impl<C> Sync for NulError<C>where
C: Sync,
impl<C> Unpin for NulError<C>where
C: Unpin,
impl<C> UnwindSafe for NulError<C>where
C: 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