pub struct Char(pub u8);
Expand description
The ascii::Char type represents a single, 8 bit ASCII character.
Tuple Fields§
§0: u8
Implementations§
Source§impl Char
impl Char
Sourcepub fn eq_ignore_case(&self, other: &Char) -> bool
pub fn eq_ignore_case(&self, other: &Char) -> bool
Compares two ascii::Char values, ignoring letter casing
Sourcepub fn is_alphabetic(&self) -> bool
pub fn is_alphabetic(&self) -> bool
Returns true if the ascii::Char is a letter (A-Z, a-z)
Sourcepub fn is_uppercase(&self) -> bool
pub fn is_uppercase(&self) -> bool
Returns true if the ascii::Char is an uppercase letter (A-Z)
Sourcepub fn is_lowercase(&self) -> bool
pub fn is_lowercase(&self) -> bool
Returns true if the ascii::Char is a lowercase letter (a-z)
Sourcepub fn is_numeric(&self) -> bool
pub fn is_numeric(&self) -> bool
Returns true if the ascii::Char is a decimal digit (0-9)
Sourcepub fn is_punctuation(&self) -> bool
pub fn is_punctuation(&self) -> bool
Returns true if the asscii::Char is punctuation
Sourcepub fn is_control(&self) -> bool
pub fn is_control(&self) -> bool
Returns true if the ascii::Char is a control code (0x00-0x1F)
Sourcepub fn is_whitespace(&self) -> bool
pub fn is_whitespace(&self) -> bool
Returns true if the ascii::Char is a whitespace character (e.g. Space, Tab)
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Char
Available on crate feature serde
only.
impl<'de> Deserialize<'de> for Char
Available on crate feature
serde
only.Source§fn deserialize<D>(deserializer: D) -> Result<Char, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Char, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Ord for Char
impl Ord for Char
Source§impl PartialOrd for Char
impl PartialOrd for Char
impl Copy for Char
impl Eq for Char
impl StructuralPartialEq for Char
Auto Trait Implementations§
impl Freeze for Char
impl RefUnwindSafe for Char
impl Send for Char
impl Sync for Char
impl Unpin for Char
impl UnwindSafe for Char
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more