Trait ascii::AsciiCast [] [src]

pub trait AsciiCast<'a>: AsciiExt {
    type Target;
    unsafe fn to_ascii_nocheck(&'a self) -> Self::Target;

    fn to_ascii(&'a self) -> Result<Self::Target, ()> { ... }
}

Trait for converting into an ascii type.

Associated Types

type Target

Required Methods

unsafe fn to_ascii_nocheck(&'a self) -> Self::Target

Convert to an ascii type, not doing any range asserts

Provided Methods

fn to_ascii(&'a self) -> Result<Self::Target, ()>

Convert to an ascii type, return Err(()) on non-ASCII input.

Implementors