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]
impl AsAsciiStrErrorpub fn valid_up_to(self) -> usize[src]
pub fn valid_up_to(self) -> usizeReturns 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]
impl Clone for AsAsciiStrErrorfn clone(&self) -> AsAsciiStrError[src]
fn clone(&self) -> AsAsciiStrErrorReturns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0[src]
fn clone_from(&mut self, source: &Self)1.0.0
[src]Performs copy-assignment from source. Read more
impl Copy for AsAsciiStrError[src]
impl Copy for AsAsciiStrErrorimpl PartialEq for AsAsciiStrError[src]
impl PartialEq for AsAsciiStrErrorfn eq(&self, other: &AsAsciiStrError) -> bool[src]
fn eq(&self, other: &AsAsciiStrError) -> boolThis method tests for self and other values to be equal, and is used by ==. Read more
fn ne(&self, other: &AsAsciiStrError) -> bool[src]
fn ne(&self, other: &AsAsciiStrError) -> boolThis method tests for !=.
impl Eq for AsAsciiStrError[src]
impl Eq for AsAsciiStrErrorimpl Debug for AsAsciiStrError[src]
impl Debug for AsAsciiStrErrorfn fmt(&self, f: &mut Formatter) -> Result[src]
fn fmt(&self, f: &mut Formatter) -> ResultFormats the value using the given formatter. Read more
impl Display for AsAsciiStrError[src]
impl Display for AsAsciiStrErrorfn fmt(&self, fmtr: &mut Formatter) -> Result[src]
fn fmt(&self, fmtr: &mut Formatter) -> ResultFormats the value using the given formatter. Read more
impl Error for AsAsciiStrError[src]
impl Error for AsAsciiStrErrorAuto Trait Implementations
impl Send for AsAsciiStrError
impl Send for AsAsciiStrErrorimpl Sync for AsAsciiStrError
impl Sync for AsAsciiStrError