pub enum PunctOp {
One(char),
Two([char; 2]),
Three([char; 3]),
}Expand description
Stores one to three operator characters inline.
Equality with a string compares the complete character sequence, not a prefix.
§Examples
use cel_parser::lex_lexer::PunctOp;
let op = PunctOp::Two(['&', '&']);
assert!(op == "&&");
assert!(op != "&");
assert!(op != "&&&");Variants§
One(char)
Single character (e.g. +, -).
Two([char; 2])
Two characters (e.g. &&, <=, ..).
Three([char; 3])
Three characters (e.g. ..=).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for PunctOp
impl RefUnwindSafe for PunctOp
impl Send for PunctOp
impl Sync for PunctOp
impl Unpin for PunctOp
impl UnsafeUnpin for PunctOp
impl UnwindSafe for PunctOp
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