pub trait Character:
Sealed
+ Copy
+ PartialEq {
type Str: ?Sized + PartialEq;
type Collection: Chain<Self> + FromIterator<Self> + AsRef<Self::Str> + 'static;
// Required methods
fn from_ascii(c: u8) -> Self;
fn is_inline_whitespace(&self) -> bool;
fn is_whitespace(&self) -> bool;
fn digit_zero() -> Self;
fn is_digit(&self, radix: u32) -> bool;
fn to_char(&self) -> char;
}
Expand description
Required Associated Types§
Sourcetype Collection: Chain<Self> + FromIterator<Self> + AsRef<Self::Str> + 'static
type Collection: Chain<Self> + FromIterator<Self> + AsRef<Self::Str> + 'static
Required Methods§
Sourcefn from_ascii(c: u8) -> Self
fn from_ascii(c: u8) -> Self
Convert the given ASCII character to this character type.
Sourcefn is_inline_whitespace(&self) -> bool
fn is_inline_whitespace(&self) -> bool
Returns true if the character is canonically considered to be inline whitespace (i.e: not part of a newline).
Sourcefn is_whitespace(&self) -> bool
fn is_whitespace(&self) -> bool
Returns true if the character is canonically considered to be whitespace.
Sourcefn digit_zero() -> Self
fn digit_zero() -> Self
Return the ‘0’ digit of the character.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.