Struct widestring::NulError [] [src]

pub struct NulError(_, _);

An error returned from WideCString to indicate that an invalid nul value was found.

The error indicates the position in the vector where the nul value was found, as well as returning the ownership of the invalid vector.


impl NulError

fn nul_position(&self) -> usize

Returns the position of the nul value in the slice that was provided to WideCString.

fn into_vec(self) -> Vec<u16>

Consumes this error, returning the underlying vector of u16 values which generated the error in the first place.

Trait Implementations

impl Eq for NulError

impl PartialEq for NulError

fn eq(&self, __arg_0: &NulError) -> bool

This method tests for self and other values to be equal, and is used by ==. Read more

fn ne(&self, __arg_0: &NulError) -> bool

This method tests for !=.

impl Clone for NulError

fn clone(&self) -> NulError

Returns a copy of the value. Read more

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more

impl Debug for NulError

fn fmt(&self, __arg_0: &mut Formatter) -> Result

Formats the value using the given formatter.

impl Into<Vec<u16>> for NulError

fn into(self) -> Vec<u16>

Performs the conversion.

impl Display for NulError

fn fmt(&self, f: &mut Formatter) -> Result

Formats the value using the given formatter.

impl Error for NulError

fn description(&self) -> &str

A short description of the error. Read more

fn cause(&self) -> Option<&Error>

The lower-level cause of this error, if any. Read more