pub struct Char(/* private fields */);
Expand description
A structure holding a char
to use within a RangeSet
.
Implementations§
Source§impl Char
impl Char
Sourcepub fn new(c: char) -> Self
pub fn new(c: char) -> Self
Create a new instance from the given char
.
§Example:
use regex_charclass::char::Char;
let c = Char::new('a');
Sourcepub fn to_char(&self) -> char
pub fn to_char(&self) -> char
Return the char
.
§Example:
use regex_charclass::char::Char;
let c = Char::new('a');
assert_eq!('a', c.to_char());
Trait Implementations§
Source§impl AddAssign for Char
impl AddAssign for Char
Source§fn add_assign(&mut self, rhs: Self)
fn add_assign(&mut self, rhs: Self)
Performs the
+=
operation. Read moreSource§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