pub struct PatternKeyword {
pub range: TextRange,
pub node_index: AtomicNodeIndex,
pub attr: Identifier,
pub pattern: Pattern,
}Expand description
An AST node to represent the keyword arguments to a crate::PatternMatchClass, i.e., the
x=0 and y=0 in case Point(x=0, y=0).
Like Keyword, but for crate::PatternMatchClass.
Fields§
§range: TextRange§node_index: AtomicNodeIndex§attr: Identifier§pattern: PatternTrait Implementations§
Source§impl Clone for PatternKeyword
impl Clone for PatternKeyword
Source§fn clone(&self) -> PatternKeyword
fn clone(&self) -> PatternKeyword
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PatternKeyword
impl Debug for PatternKeyword
Source§impl<'a> From<&'a PatternKeyword> for AnyNodeRef<'a>
impl<'a> From<&'a PatternKeyword> for AnyNodeRef<'a>
Source§fn from(node: &'a PatternKeyword) -> AnyNodeRef<'a>
fn from(node: &'a PatternKeyword) -> AnyNodeRef<'a>
Converts to this type from the input type.
Source§impl<'a> From<&'a PatternKeyword> for AnyRootNodeRef<'a>
impl<'a> From<&'a PatternKeyword> for AnyRootNodeRef<'a>
Source§fn from(node: &'a PatternKeyword) -> AnyRootNodeRef<'a>
fn from(node: &'a PatternKeyword) -> AnyRootNodeRef<'a>
Converts to this type from the input type.
Source§impl<'a> From<&'a PatternKeyword> for ComparablePatternKeyword<'a>
impl<'a> From<&'a PatternKeyword> for ComparablePatternKeyword<'a>
Source§fn from(keyword: &'a PatternKeyword) -> Self
fn from(keyword: &'a PatternKeyword) -> Self
Converts to this type from the input type.
Source§impl HasNodeIndex for PatternKeyword
impl HasNodeIndex for PatternKeyword
Source§fn node_index(&self) -> &AtomicNodeIndex
fn node_index(&self) -> &AtomicNodeIndex
Returns the
AtomicNodeIndex for this node.Source§impl PartialEq for PatternKeyword
impl PartialEq for PatternKeyword
Source§impl Ranged for PatternKeyword
impl Ranged for PatternKeyword
Source§impl<'a> TryFrom<AnyRootNodeRef<'a>> for &'a PatternKeyword
impl<'a> TryFrom<AnyRootNodeRef<'a>> for &'a PatternKeyword
impl StructuralPartialEq for PatternKeyword
Auto Trait Implementations§
impl !Freeze for PatternKeyword
impl RefUnwindSafe for PatternKeyword
impl Send for PatternKeyword
impl Sync for PatternKeyword
impl Unpin for PatternKeyword
impl UnsafeUnpin for PatternKeyword
impl UnwindSafe for PatternKeyword
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more