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]

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 Clone for AsAsciiStrError
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Copy for AsAsciiStrError
[src]

impl PartialEq for AsAsciiStrError
[src]

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

This method tests for !=.

impl Eq for AsAsciiStrError
[src]

impl Debug for AsAsciiStrError
[src]

Formats the value using the given formatter.

impl Display for AsAsciiStrError
[src]

Formats the value using the given formatter.

impl Error for AsAsciiStrError
[src]

Returns "one or more bytes are not ASCII"

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