Struct regex::input::Char [−][src]
pub struct Char(u32);
An inline representation of Option<char>
.
This eliminates the need to do case analysis on Option<char>
to determine
ordinality with other characters.
(The Option<char>
is not related to encoding. Instead, it is used in the
matching engines to represent the beginning and ending boundaries of the
search text.)
Methods
impl Char
[src]
impl Char
pub fn is_none(self) -> bool
[src]
pub fn is_none(self) -> bool
Returns true iff the character is absent.
pub fn len_utf8(self) -> usize
[src]
pub fn len_utf8(self) -> usize
Returns the length of the character's UTF-8 encoding.
If the character is absent, then 0
is returned.
pub fn is_word_char(self) -> bool
[src]
pub fn is_word_char(self) -> bool
Returns true iff the character is a word character.
If the character is absent, then false is returned.
pub fn is_word_byte(self) -> bool
[src]
pub fn is_word_byte(self) -> bool
Returns true iff the byte is a word byte.
If the byte is absent, then false is returned.
Trait Implementations
impl Clone for Char
[src]
impl Clone for Char
fn clone(&self) -> Char
[src]
fn clone(&self) -> Char
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl Copy for Char
[src]
impl Copy for Char
impl Hash for Char
[src]
impl Hash for Char
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
Feeds this value into the given [Hasher
]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more
impl PartialEq for Char
[src]
impl PartialEq for Char
fn eq(&self, other: &Char) -> bool
[src]
fn eq(&self, other: &Char) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Char) -> bool
[src]
fn ne(&self, other: &Char) -> bool
This method tests for !=
.
impl Eq for Char
[src]
impl Eq for Char
fn assert_receiver_is_total_eq(&self)
[src]
fn assert_receiver_is_total_eq(&self)
impl PartialOrd for Char
[src]
impl PartialOrd for Char
fn partial_cmp(&self, other: &Char) -> Option<Ordering>
[src]
fn partial_cmp(&self, other: &Char) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
fn lt(&self, other: &Char) -> bool
[src]
fn lt(&self, other: &Char) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
fn le(&self, other: &Char) -> bool
[src]
fn le(&self, other: &Char) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
fn gt(&self, other: &Char) -> bool
[src]
fn gt(&self, other: &Char) -> bool
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
fn ge(&self, other: &Char) -> bool
[src]
fn ge(&self, other: &Char) -> bool
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
impl Ord for Char
[src]
impl Ord for Char
fn cmp(&self, other: &Char) -> Ordering
[src]
fn cmp(&self, other: &Char) -> Ordering
This method returns an Ordering
between self
and other
. Read more
fn max(self, other: Self) -> Self
1.21.0[src]
fn max(self, other: Self) -> Self
Compares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self
1.21.0[src]
fn min(self, other: Self) -> Self
Compares and returns the minimum of two values. Read more
impl Debug for Char
[src]
impl Debug for Char
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl From<char> for Char
[src]
impl From<char> for Char
impl From<Option<char>> for Char
[src]
impl From<Option<char>> for Char
impl PartialEq<char> for Char
[src]
impl PartialEq<char> for Char
fn eq(&self, other: &char) -> bool
[src]
fn eq(&self, other: &char) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
fn ne(&self, other: &Rhs) -> bool
This method tests for !=
.
impl PartialEq<Char> for char
[src]
impl PartialEq<Char> for char
fn eq(&self, other: &Char) -> bool
[src]
fn eq(&self, other: &Char) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
fn ne(&self, other: &Rhs) -> bool
This method tests for !=
.
impl PartialOrd<char> for Char
[src]
impl PartialOrd<char> for Char
fn partial_cmp(&self, other: &char) -> Option<Ordering>
[src]
fn partial_cmp(&self, other: &char) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
#[must_use]
fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
#[must_use]
fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
#[must_use]
fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
fn gt(&self, other: &Rhs) -> bool
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
#[must_use]
fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
fn ge(&self, other: &Rhs) -> bool
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
impl PartialOrd<Char> for char
[src]
impl PartialOrd<Char> for char
fn partial_cmp(&self, other: &Char) -> Option<Ordering>
[src]
fn partial_cmp(&self, other: &Char) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
#[must_use]
fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
#[must_use]
fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
#[must_use]
fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
fn gt(&self, other: &Rhs) -> bool
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
#[must_use]
fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
fn ge(&self, other: &Rhs) -> bool
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more