Trait std::ascii::OwnedAsciiCast
pub trait OwnedAsciiCast { fn is_ascii(&self) -> bool; unsafe fn into_ascii_nocheck(self) -> ~[Ascii]; fn into_ascii(self) -> ~[Ascii] { ... } fn into_ascii_opt(self) -> Option<~[Ascii]> { ... } }
Trait for copyless casting to an ascii vector.
Required Methods
fn is_ascii(&self) -> bool
Check if convertible to ascii
unsafe fn into_ascii_nocheck(self) -> ~[Ascii]
Take ownership and cast to an ascii vector. Does not perform validation checks.
Provided Methods
fn into_ascii(self) -> ~[Ascii]
Take ownership and cast to an ascii vector. Fail on non-ASCII input.
fn into_ascii_opt(self) -> Option<~[Ascii]>
Take ownership and cast to an ascii vector. Return None on non-ASCII input.
Implementors
impl OwnedAsciiCast for ~[u8]
impl OwnedAsciiCast for ~str