pub trait IntoAsciiString: Sized {
    // Required methods
    unsafe fn into_ascii_string_unchecked(self) -> AsciiString;
    fn into_ascii_string(self) -> Result<AsciiString, FromAsciiError<Self>>;
}
Expand description

Convert vectors into AsciiString.

Required Methods§

source

unsafe fn into_ascii_string_unchecked(self) -> AsciiString

Convert to AsciiString without checking for non-ASCII characters.

source

fn into_ascii_string(self) -> Result<AsciiString, FromAsciiError<Self>>

Convert to AsciiString.

Implementations on Foreign Types§

source§

impl IntoAsciiString for Vec<AsciiChar>

source§

impl<'a> IntoAsciiString for &'a [u8]

source§

impl<'a> IntoAsciiString for &'a CStr

Note that the trailing null byte will be removed in the conversion.

source§

impl<'a> IntoAsciiString for &'a str

source§

impl IntoAsciiString for Vec<u8>

source§

impl IntoAsciiString for String

source§

impl<'a, B> IntoAsciiString for Cow<'a, B>where B: 'a + ToOwned + ?Sized, &'a B: IntoAsciiString, <B as ToOwned>::Owned: IntoAsciiString,

source§

impl IntoAsciiString for CString

Note that the trailing null byte will be removed in the conversion.

source§

impl<'a> IntoAsciiString for &'a [AsciiChar]

Implementors§