pub enum Delim {
None,
Paren,
Brace,
Bracket,
}Expand description
The delimiter kind of a grouped token sequence.
Variants§
Implementations§
Source§impl Delim
impl Delim
pub fn from_char(ch: char) -> Option<Self>
pub fn from_open(ch: char) -> Option<Self>
pub fn from_close(ch: char) -> Option<Self>
pub fn as_str(&self) -> &'static str
pub fn open(&self) -> char
pub fn close(&self) -> char
pub fn is_none(&self) -> bool
pub fn is_brace(&self) -> bool
pub fn is_bracket(&self) -> bool
pub fn is_paren(&self) -> bool
Trait Implementations§
impl Copy for Delim
impl Eq for Delim
impl StructuralPartialEq for Delim
Auto Trait Implementations§
impl Freeze for Delim
impl RefUnwindSafe for Delim
impl Send for Delim
impl Sync for Delim
impl Unpin for Delim
impl UnsafeUnpin for Delim
impl UnwindSafe for Delim
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