pub trait IntoAsciiString: Sized {
    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

Convert to AsciiString without checking for non-ASCII characters.

Safety

If self contains non-ascii characters, calling this function is undefined behavior.

Convert to AsciiString.

Errors

If self contains non-ascii characters, this will return Err

Implementations on Foreign Types

Notes

The trailing null byte CString has will be removed during this conversion.

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

Implementors