Trait ascii::OwnedAsciiCast [] [src]

pub trait OwnedAsciiCast<T: ?Sized>: Sized + Borrow<T> where T: AsciiExt<Owned=Self> {
    unsafe fn into_ascii_nocheck(self) -> AsciiString;

    fn into_ascii(self) -> Result<AsciiString, Self> { ... }
}

Trait for copyless casting to an ascii vector.

Required Methods

unsafe fn into_ascii_nocheck(self) -> AsciiString

Take ownership and cast to an ascii vector. Does not perform validation checks.

Provided Methods

fn into_ascii(self) -> Result<AsciiString, Self>

Take ownership and cast to an ascii vector. On non-ASCII input return ownership of data that was attempted to cast to ascii in Err(Self).

Implementors