Struct regex::internal::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 Charpub fn is_none(self) -> bool[src]
pub fn is_none(self) -> boolReturns true iff the character is absent.
pub fn len_utf8(self) -> usize[src]
pub fn len_utf8(self) -> usizeReturns 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) -> boolReturns 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) -> boolReturns 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 Charfn clone(&self) -> Char[src]
fn clone(&self) -> CharReturns 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 Charimpl Hash for Char[src]
impl Hash for Charfn 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 Charfn eq(&self, other: &Char) -> bool[src]
fn eq(&self, other: &Char) -> boolThis 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) -> boolThis method tests for !=.
impl Eq for Char[src]
impl Eq for Charfn assert_receiver_is_total_eq(&self)[src]
fn assert_receiver_is_total_eq(&self)impl PartialOrd for Char[src]
impl PartialOrd for Charfn 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) -> boolThis 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) -> boolThis 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) -> boolThis 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) -> boolThis 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 Charfn cmp(&self, other: &Char) -> Ordering[src]
fn cmp(&self, other: &Char) -> OrderingThis method returns an Ordering between self and other. Read more
fn max(self, other: Self) -> Self1.21.0[src]
fn max(self, other: Self) -> SelfCompares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self1.21.0[src]
fn min(self, other: Self) -> SelfCompares and returns the minimum of two values. Read more
impl Debug for Char[src]
impl Debug for Charfn fmt(&self, f: &mut Formatter) -> Result[src]
fn fmt(&self, f: &mut Formatter) -> ResultFormats the value using the given formatter. Read more
impl From<char> for Char[src]
impl From<char> for Charimpl From<Option<char>> for Char[src]
impl From<Option<char>> for Charimpl PartialEq<char> for Char[src]
impl PartialEq<char> for Charfn eq(&self, other: &char) -> bool[src]
fn eq(&self, other: &char) -> boolThis method tests for self and other values to be equal, and is used by ==. Read more
#[must_use]
fn ne(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]
fn ne(&self, other: &Rhs) -> boolThis method tests for !=.
impl PartialEq<Char> for char[src]
impl PartialEq<Char> for charfn eq(&self, other: &Char) -> bool[src]
fn eq(&self, other: &Char) -> boolThis method tests for self and other values to be equal, and is used by ==. Read more
#[must_use]
fn ne(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]
fn ne(&self, other: &Rhs) -> boolThis method tests for !=.
impl PartialOrd<char> for Char[src]
impl PartialOrd<char> for Charfn 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) -> bool1.0.0[src]
#[must_use]
fn lt(&self, other: &Rhs) -> boolThis method tests less than (for self and other) and is used by the < operator. Read more
#[must_use]
fn le(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]
fn le(&self, other: &Rhs) -> boolThis 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) -> bool1.0.0[src]
#[must_use]
fn gt(&self, other: &Rhs) -> boolThis method tests greater than (for self and other) and is used by the > operator. Read more
#[must_use]
fn ge(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]
fn ge(&self, other: &Rhs) -> boolThis 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 charfn 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) -> bool1.0.0[src]
#[must_use]
fn lt(&self, other: &Rhs) -> boolThis method tests less than (for self and other) and is used by the < operator. Read more
#[must_use]
fn le(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]
fn le(&self, other: &Rhs) -> boolThis 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) -> bool1.0.0[src]
#[must_use]
fn gt(&self, other: &Rhs) -> boolThis method tests greater than (for self and other) and is used by the > operator. Read more
#[must_use]
fn ge(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]
fn ge(&self, other: &Rhs) -> boolThis method tests greater than or equal to (for self and other) and is used by the >= operator. Read more