Trait ascii::AsAsciiStr
[−]
[src]
pub trait AsAsciiStr { unsafe fn as_ascii_str_unchecked(&self) -> &AsciiStr; fn as_ascii_str(&self) -> Result<&AsciiStr, AsAsciiStrError>; }
Convert slices of bytes to AsciiStr
.
Required Methods
unsafe fn as_ascii_str_unchecked(&self) -> &AsciiStr
Convert to an ASCII slice without checking for non-ASCII characters.
fn as_ascii_str(&self) -> Result<&AsciiStr, AsAsciiStrError>
Convert to an ASCII slice.