Struct ascii::AsAsciiStrError [] [src]

pub struct AsAsciiStrError(_);

Error that is returned when a sequence of u8 are not all ASCII.

Is used by As[Mut]AsciiStr and the from_ascii method on AsciiStr and AsciiString.

Methods

impl AsAsciiStrError
[src]

fn valid_up_to(self) -> usize

Returns the index of the first non-ASCII byte.

It is the maximum index such that from_ascii(input[..index]) would return Ok(_).

Trait Implementations

impl Debug for AsAsciiStrError
[src]

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

Formats the value using the given formatter.

impl Eq for AsAsciiStrError
[src]

impl PartialEq for AsAsciiStrError
[src]

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

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

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

This method tests for !=.

impl Copy for AsAsciiStrError
[src]

impl Clone for AsAsciiStrError
[src]

fn clone(&self) -> AsAsciiStrError

Returns a copy of the value. Read more

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

Performs copy-assignment from source. Read more

impl Display for AsAsciiStrError
[src]

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

Formats the value using the given formatter.

impl Error for AsAsciiStrError
[src]

fn description(&self) -> &'static str

Returns "one or more bytes are not ASCII"

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

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