Struct widestring::error::ContainsNul
source · pub struct ContainsNul<C> { /* private fields */ }
Available on crate feature
alloc
only.Expand description
An error returned to indicate that an invalid nul value was found in a string.
The error indicates the position in the vector where the nul value was found, as well as returning the ownership of the invalid vector.
Implementations§
source§impl<C> ContainsNul<C>
impl<C> ContainsNul<C>
sourcepub fn nul_position(&self) -> usize
pub fn nul_position(&self) -> usize
Returns the index of the invalid nul value in the slice.
Trait Implementations§
source§impl<C: Clone> Clone for ContainsNul<C>
impl<C: Clone> Clone for ContainsNul<C>
source§fn clone(&self) -> ContainsNul<C>
fn clone(&self) -> ContainsNul<C>
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<C: Debug> Debug for ContainsNul<C>
impl<C: Debug> Debug for ContainsNul<C>
source§impl<C> Display for ContainsNul<C>
impl<C> Display for ContainsNul<C>
source§impl<C> Error for ContainsNul<C>where
C: Debug,
impl<C> Error for ContainsNul<C>where
C: Debug,
1.30.0 · 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.
Auto Trait Implementations§
impl<C> Freeze for ContainsNul<C>
impl<C> RefUnwindSafe for ContainsNul<C>where
C: RefUnwindSafe,
impl<C> Send for ContainsNul<C>where
C: Send,
impl<C> Sync for ContainsNul<C>where
C: Sync,
impl<C> Unpin for ContainsNul<C>where
C: Unpin,
impl<C> UnwindSafe for ContainsNul<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