pub struct ArrayPattern<'ast> {
pub patterns: &'ast [Pattern<'ast>],
pub tail: TailPattern,
pub pos: TermPos,
}Expand description
An array pattern.
Fields§
§patterns: &'ast [Pattern<'ast>]The patterns of the elements of the array.
tail: TailPatternThe tail of the pattern, indicating if the pattern is open, i.e. if it ended with an ellipsis, capturing the rest or not.
pos: TermPosImplementations§
Trait Implementations§
Source§impl<'ast> Clone for ArrayPattern<'ast>
impl<'ast> Clone for ArrayPattern<'ast>
Source§fn clone(&self) -> ArrayPattern<'ast>
fn clone(&self) -> ArrayPattern<'ast>
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 CloneTo for ArrayPattern<'_>
impl CloneTo for ArrayPattern<'_>
Source§type Data<'ast> = ArrayPattern<'ast>
type Data<'ast> = ArrayPattern<'ast>
This is always
Self, be we need associated types to make Rust understand that Self is
always parametric over the 'ast lifetime. We’re using GATs to emulate higher-kinded
types.Source§impl<'ast> Debug for ArrayPattern<'ast>
impl<'ast> Debug for ArrayPattern<'ast>
Source§impl Display for ArrayPattern<'_>
impl Display for ArrayPattern<'_>
Source§impl<'ast> PartialEq for ArrayPattern<'ast>
impl<'ast> PartialEq for ArrayPattern<'ast>
Source§impl<'a> Pretty<'a, Allocator> for &ArrayPattern<'_>
impl<'a> Pretty<'a, Allocator> for &ArrayPattern<'_>
impl Allocable for ArrayPattern<'_>
impl<'ast> Eq for ArrayPattern<'ast>
impl<'ast> StructuralPartialEq for ArrayPattern<'ast>
Auto Trait Implementations§
impl<'ast> Freeze for ArrayPattern<'ast>
impl<'ast> RefUnwindSafe for ArrayPattern<'ast>
impl<'ast> Send for ArrayPattern<'ast>
impl<'ast> Sync for ArrayPattern<'ast>
impl<'ast> Unpin for ArrayPattern<'ast>
impl<'ast> UnsafeUnpin for ArrayPattern<'ast>
impl<'ast> UnwindSafe for ArrayPattern<'ast>
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.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