pub enum PatternOrResolved<'a, 'b, Q: QueryContext> {
Pattern(&'a Pattern<Q>),
Resolved(&'b Q::ResolvedPattern<'a>),
ResolvedBinding(Q::ResolvedPattern<'a>),
}
Variants§
Pattern(&'a Pattern<Q>)
Resolved(&'b Q::ResolvedPattern<'a>)
ResolvedBinding(Q::ResolvedPattern<'a>)
Trait Implementations§
Source§impl<'a, 'b, Q: Debug + QueryContext> Debug for PatternOrResolved<'a, 'b, Q>where
Q::ResolvedPattern<'a>: Debug,
impl<'a, 'b, Q: Debug + QueryContext> Debug for PatternOrResolved<'a, 'b, Q>where
Q::ResolvedPattern<'a>: Debug,
Auto Trait Implementations§
impl<'a, 'b, Q> Freeze for PatternOrResolved<'a, 'b, Q>
impl<'a, 'b, Q> RefUnwindSafe for PatternOrResolved<'a, 'b, Q>where
<Q as QueryContext>::ResolvedPattern<'a>: RefUnwindSafe,
<Q as QueryContext>::LeafNodePattern: RefUnwindSafe,
<Q as QueryContext>::CodeSnippet: RefUnwindSafe,
<Q as QueryContext>::NodePattern: RefUnwindSafe,
impl<'a, 'b, Q> Send for PatternOrResolved<'a, 'b, Q>where
<Q as QueryContext>::ResolvedPattern<'a>: Send + Sync,
<Q as QueryContext>::LeafNodePattern: Sync,
<Q as QueryContext>::CodeSnippet: Sync,
<Q as QueryContext>::NodePattern: Sync,
impl<'a, 'b, Q> Sync for PatternOrResolved<'a, 'b, Q>where
<Q as QueryContext>::ResolvedPattern<'a>: Sync,
<Q as QueryContext>::LeafNodePattern: Sync,
<Q as QueryContext>::CodeSnippet: Sync,
<Q as QueryContext>::NodePattern: Sync,
impl<'a, 'b, Q> Unpin for PatternOrResolved<'a, 'b, Q>
impl<'a, 'b, Q> UnwindSafe for PatternOrResolved<'a, 'b, Q>where
<Q as QueryContext>::ResolvedPattern<'a>: UnwindSafe + RefUnwindSafe,
<Q as QueryContext>::LeafNodePattern: RefUnwindSafe,
<Q as QueryContext>::CodeSnippet: RefUnwindSafe,
<Q as QueryContext>::NodePattern: RefUnwindSafe,
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> 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