Trait ascii::AsAsciiStr [−][src]
Convert slices of bytes to AsciiStr
.
Required methods
unsafe fn as_ascii_str_unchecked(&self) -> &AsciiStr
[src]
Convert to an ASCII slice without checking for non-ASCII characters.
fn as_ascii_str(&self) -> Result<&AsciiStr, AsAsciiStrError>
[src]
Convert to an ASCII slice.
Implementations on Foreign Types
impl<'a, T: ?Sized> AsAsciiStr for &'a T where
T: AsAsciiStr,
[src]
T: AsAsciiStr,
fn as_ascii_str(&self) -> Result<&AsciiStr, AsAsciiStrError>
[src]
unsafe fn as_ascii_str_unchecked(&self) -> &AsciiStr
[src]
impl<'a, T: ?Sized> AsAsciiStr for &'a mut T where
T: AsAsciiStr,
[src]
T: AsAsciiStr,
fn as_ascii_str(&self) -> Result<&AsciiStr, AsAsciiStrError>
[src]
unsafe fn as_ascii_str_unchecked(&self) -> &AsciiStr
[src]
impl AsAsciiStr for [AsciiChar]
[src]
fn as_ascii_str(&self) -> Result<&AsciiStr, AsAsciiStrError>
[src]
unsafe fn as_ascii_str_unchecked(&self) -> &AsciiStr
[src]
impl AsAsciiStr for [u8]
[src]
fn as_ascii_str(&self) -> Result<&AsciiStr, AsAsciiStrError>
[src]
unsafe fn as_ascii_str_unchecked(&self) -> &AsciiStr
[src]
impl AsAsciiStr for str
[src]
fn as_ascii_str(&self) -> Result<&AsciiStr, AsAsciiStrError>
[src]
unsafe fn as_ascii_str_unchecked(&self) -> &AsciiStr
[src]
impl AsAsciiStr for CStr
[src]
Note that the trailing null byte will be removed in the conversion.