Trait std::ascii::AsciiCast
pub trait AsciiCast<T> { unsafe fn to_ascii_nocheck(&self) -> T; fn is_ascii(&self) -> bool; fn to_ascii(&self) -> T { ... } fn to_ascii_opt(&self) -> Option<T> { ... } }
Trait for converting into an ascii type.
Required Methods
unsafe fn to_ascii_nocheck(&self) -> T
Convert to an ascii type, not doing any range asserts
fn is_ascii(&self) -> bool
Check if convertible to ascii
Provided Methods
fn to_ascii(&self) -> T
Convert to an ascii type, fail on non-ASCII input.
fn to_ascii_opt(&self) -> Option<T>
Convert to an ascii type, return None on non-ASCII input.