pub struct ConstantPattern<'ast> {
pub data: ConstantPatternData<'ast>,
pub pos: TermPos,
}Expand description
A constant pattern, matching a constant value.
Fields§
§data: ConstantPatternData<'ast>§pos: TermPosTrait Implementations§
Source§impl<'ast> Clone for ConstantPattern<'ast>
impl<'ast> Clone for ConstantPattern<'ast>
Source§fn clone(&self) -> ConstantPattern<'ast>
fn clone(&self) -> ConstantPattern<'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 ConstantPattern<'_>
impl CloneTo for ConstantPattern<'_>
Source§type Data<'ast> = ConstantPattern<'ast>
type Data<'ast> = ConstantPattern<'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 ConstantPattern<'ast>
impl<'ast> Debug for ConstantPattern<'ast>
Source§impl Display for ConstantPattern<'_>
impl Display for ConstantPattern<'_>
Source§impl<'ast> PartialEq for ConstantPattern<'ast>
impl<'ast> PartialEq for ConstantPattern<'ast>
Source§impl<'a> Pretty<'a, Allocator> for &ConstantPattern<'_>
impl<'a> Pretty<'a, Allocator> for &ConstantPattern<'_>
impl Allocable for ConstantPattern<'_>
impl<'ast> Eq for ConstantPattern<'ast>
impl<'ast> StructuralPartialEq for ConstantPattern<'ast>
Auto Trait Implementations§
impl<'ast> Freeze for ConstantPattern<'ast>
impl<'ast> RefUnwindSafe for ConstantPattern<'ast>
impl<'ast> Send for ConstantPattern<'ast>
impl<'ast> Sync for ConstantPattern<'ast>
impl<'ast> Unpin for ConstantPattern<'ast>
impl<'ast> UnsafeUnpin for ConstantPattern<'ast>
impl<'ast> UnwindSafe for ConstantPattern<'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