pub struct PatternArguments {
pub range: TextRange,
pub node_index: AtomicNodeIndex,
pub patterns: Vec<Pattern>,
pub keywords: Vec<PatternKeyword>,
}Expand description
An AST node to represent the arguments to a crate::PatternMatchClass, i.e., the
parenthesized contents in case Point(1, x=0, y=0).
Like Arguments, but for crate::PatternMatchClass.
Fields§
§range: TextRange§node_index: AtomicNodeIndex§patterns: Vec<Pattern>§keywords: Vec<PatternKeyword>Implementations§
Source§impl PatternArguments
impl PatternArguments
Sourcepub fn patterns_source_order(&self) -> PatternArgumentsSourceOrder<'_> ⓘ
pub fn patterns_source_order(&self) -> PatternArgumentsSourceOrder<'_> ⓘ
Returns an iterator over the patterns and keywords in source order.
Trait Implementations§
Source§impl Clone for PatternArguments
impl Clone for PatternArguments
Source§fn clone(&self) -> PatternArguments
fn clone(&self) -> PatternArguments
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 PatternArguments
impl Debug for PatternArguments
Source§impl<'a> From<&'a PatternArguments> for AnyNodeRef<'a>
impl<'a> From<&'a PatternArguments> for AnyNodeRef<'a>
Source§fn from(node: &'a PatternArguments) -> AnyNodeRef<'a>
fn from(node: &'a PatternArguments) -> AnyNodeRef<'a>
Converts to this type from the input type.
Source§impl<'a> From<&'a PatternArguments> for AnyRootNodeRef<'a>
impl<'a> From<&'a PatternArguments> for AnyRootNodeRef<'a>
Source§fn from(node: &'a PatternArguments) -> AnyRootNodeRef<'a>
fn from(node: &'a PatternArguments) -> AnyRootNodeRef<'a>
Converts to this type from the input type.
Source§impl<'a> From<&'a PatternArguments> for ComparablePatternArguments<'a>
impl<'a> From<&'a PatternArguments> for ComparablePatternArguments<'a>
Source§fn from(parameters: &'a PatternArguments) -> ComparablePatternArguments<'a>
fn from(parameters: &'a PatternArguments) -> ComparablePatternArguments<'a>
Converts to this type from the input type.
Source§impl GetSize for PatternArguments
impl GetSize for PatternArguments
Source§fn get_heap_size(&self) -> usize
fn get_heap_size(&self) -> usize
Determines how many bytes this object occupies inside the heap. Read more
Source§fn get_heap_size_with_tracker<TRACKER>(
&self,
tracker: TRACKER,
) -> (usize, TRACKER)where
TRACKER: GetSizeTracker,
fn get_heap_size_with_tracker<TRACKER>(
&self,
tracker: TRACKER,
) -> (usize, TRACKER)where
TRACKER: GetSizeTracker,
Determines how many bytes this object occupies inside the heap while using a
tracker. Read moreSource§fn get_stack_size() -> usize
fn get_stack_size() -> usize
Determines how may bytes this object occupies inside the stack. Read more
Source§fn get_size_with_tracker<T>(&self, tracker: T) -> (usize, T)where
T: GetSizeTracker,
fn get_size_with_tracker<T>(&self, tracker: T) -> (usize, T)where
T: GetSizeTracker,
Determines the total size of the object while using a
tracker. Read moreSource§impl HasNodeIndex for PatternArguments
impl HasNodeIndex for PatternArguments
Source§fn node_index(&self) -> &AtomicNodeIndex
fn node_index(&self) -> &AtomicNodeIndex
Returns the
AtomicNodeIndex for this node.Source§impl PartialEq for PatternArguments
impl PartialEq for PatternArguments
Source§impl Ranged for PatternArguments
impl Ranged for PatternArguments
Source§impl<'a> TryFrom<AnyRootNodeRef<'a>> for &'a PatternArguments
impl<'a> TryFrom<AnyRootNodeRef<'a>> for &'a PatternArguments
impl StructuralPartialEq for PatternArguments
Auto Trait Implementations§
impl !Freeze for PatternArguments
impl RefUnwindSafe for PatternArguments
impl Send for PatternArguments
impl Sync for PatternArguments
impl Unpin for PatternArguments
impl UnsafeUnpin for PatternArguments
impl UnwindSafe for PatternArguments
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