Enum ra_ap_syntax::ast::Pat
source · pub enum Pat {
Show 16 variants
IdentPat(IdentPat),
BoxPat(BoxPat),
RestPat(RestPat),
LiteralPat(LiteralPat),
MacroPat(MacroPat),
OrPat(OrPat),
ParenPat(ParenPat),
PathPat(PathPat),
WildcardPat(WildcardPat),
RangePat(RangePat),
RecordPat(RecordPat),
RefPat(RefPat),
SlicePat(SlicePat),
TuplePat(TuplePat),
TupleStructPat(TupleStructPat),
ConstBlockPat(ConstBlockPat),
}
Variants§
IdentPat(IdentPat)
BoxPat(BoxPat)
RestPat(RestPat)
LiteralPat(LiteralPat)
MacroPat(MacroPat)
OrPat(OrPat)
ParenPat(ParenPat)
PathPat(PathPat)
WildcardPat(WildcardPat)
RangePat(RangePat)
RecordPat(RecordPat)
RefPat(RefPat)
SlicePat(SlicePat)
TuplePat(TuplePat)
TupleStructPat(TupleStructPat)
ConstBlockPat(ConstBlockPat)
Trait Implementations§
source§impl AstNode for Pat
impl AstNode for Pat
fn can_cast(kind: SyntaxKind) -> bool
fn cast(syntax: SyntaxNode) -> Option<Self>
fn syntax(&self) -> &SyntaxNode
fn clone_for_update(&self) -> Selfwhere Self: Sized,
fn clone_subtree(&self) -> Selfwhere Self: Sized,
source§impl From<ConstBlockPat> for Pat
impl From<ConstBlockPat> for Pat
source§fn from(node: ConstBlockPat) -> Pat
fn from(node: ConstBlockPat) -> Pat
Converts to this type from the input type.
source§impl From<LiteralPat> for Pat
impl From<LiteralPat> for Pat
source§fn from(node: LiteralPat) -> Pat
fn from(node: LiteralPat) -> Pat
Converts to this type from the input type.
source§impl From<TupleStructPat> for Pat
impl From<TupleStructPat> for Pat
source§fn from(node: TupleStructPat) -> Pat
fn from(node: TupleStructPat) -> Pat
Converts to this type from the input type.
source§impl From<WildcardPat> for Pat
impl From<WildcardPat> for Pat
source§fn from(node: WildcardPat) -> Pat
fn from(node: WildcardPat) -> Pat
Converts to this type from the input type.
impl Eq for Pat
impl StructuralEq for Pat
impl StructuralPartialEq for Pat
Auto Trait Implementations§
impl !RefUnwindSafe for Pat
impl !Send for Pat
impl !Sync for Pat
impl Unpin for Pat
impl !UnwindSafe for Pat
Blanket Implementations§
source§impl<N> AstNodeEdit for Nwhere
N: AstNode + Clone,
impl<N> AstNodeEdit for Nwhere N: AstNode + Clone,
fn indent_level(&self) -> IndentLevel
fn indent(&self, level: IndentLevel) -> Self
fn dedent(&self, level: IndentLevel) -> Self
fn reset_indent(&self) -> Self
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
§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.