pub enum ExpressionRestriction {
None,
NoStructLiteral,
}Expand description
Selects whether a header reserves an identifier’s following brace for its body.
Explicit delimiters establish ordinary expression boundaries; unary, binary, and closure expressions inherit the surrounding restriction.
§Examples
use cel_parser::{CELParser, ExpressionRestriction, OpLookup};
let mut parser = CELParser::new(OpLookup::new());
parser.set_tokens("true {}".parse::<proc_macro2::TokenStream>().unwrap().into_iter());
parser.parse_expression_restricted(ExpressionRestriction::NoStructLiteral).unwrap();Variants§
None
Allows ordinary record literals.
NoStructLiteral
Leaves an unparenthesized identifier’s following brace to the enclosing grammar.
Trait Implementations§
Source§impl Clone for ExpressionRestriction
impl Clone for ExpressionRestriction
Source§fn clone(&self) -> ExpressionRestriction
fn clone(&self) -> ExpressionRestriction
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for ExpressionRestriction
Source§impl Debug for ExpressionRestriction
impl Debug for ExpressionRestriction
impl Eq for ExpressionRestriction
Source§impl PartialEq for ExpressionRestriction
impl PartialEq for ExpressionRestriction
impl StructuralPartialEq for ExpressionRestriction
Auto Trait Implementations§
impl Freeze for ExpressionRestriction
impl RefUnwindSafe for ExpressionRestriction
impl Send for ExpressionRestriction
impl Sync for ExpressionRestriction
impl Unpin for ExpressionRestriction
impl UnsafeUnpin for ExpressionRestriction
impl UnwindSafe for ExpressionRestriction
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