pub struct Constraint { /* private fields */ }Expand description
A Constraint node (family.ungram rule Constraint).
Implementations§
Source§impl Constraint
impl Constraint
pub fn len(&self) -> Option<Bound>
pub fn l_bracket_token(&self) -> Option<SyntaxToken>
pub fn dotdot_token(&self) -> Option<SyntaxToken>
pub fn step_token(&self) -> Option<SyntaxToken>
pub fn match_token(&self) -> Option<SyntaxToken>
pub fn r_bracket_token(&self) -> Option<SyntaxToken>
Source§impl Constraint
impl Constraint
Sourcepub fn min(&self) -> Option<Literal>
pub fn min(&self) -> Option<Literal>
The lower endpoint of a scalar range — the literal before ...
Sourcepub fn max(&self) -> Option<Literal>
pub fn max(&self) -> Option<Literal>
The upper endpoint of a scalar range — the literal after ...
Sourcepub fn step(&self) -> Option<Literal>
pub fn step(&self) -> Option<Literal>
The step of a scalar range — the literal after the step keyword
(typl reference §4.3).
Sourcepub fn match_pattern(&self) -> Option<Literal>
pub fn match_pattern(&self) -> Option<Literal>
The pattern after the match keyword — a regex literal or a named
constant reference (typl reference §5.3).
Trait Implementations§
Source§impl AstNode for Constraint
impl AstNode for Constraint
Source§fn cast(syntax: SyntaxNode) -> Option<Self>
fn cast(syntax: SyntaxNode) -> Option<Self>
Wraps
syntax if its kind matches this type; None otherwise.Source§fn syntax(&self) -> &SyntaxNode
fn syntax(&self) -> &SyntaxNode
The underlying untyped node.
Source§impl Clone for Constraint
impl Clone for Constraint
Source§impl Debug for Constraint
impl Debug for Constraint
impl Eq for Constraint
Source§impl Hash for Constraint
impl Hash for Constraint
Source§impl PartialEq for Constraint
impl PartialEq for Constraint
impl StructuralPartialEq for Constraint
Auto Trait Implementations§
impl !RefUnwindSafe for Constraint
impl !Send for Constraint
impl !Sync for Constraint
impl !UnwindSafe for Constraint
impl Freeze for Constraint
impl Unpin for Constraint
impl UnsafeUnpin for Constraint
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