pub enum ResolvedPattern {
Wildcard,
Literal(Literal),
Ident(String),
EmptyList,
Cons(String, String),
Tuple(Vec<ResolvedPattern>),
Ctor(ResolvedCtor, Vec<String>),
}Expand description
Pattern shape — mirror of crate::ast::Pattern.
Variants§
Wildcard
Literal(Literal)
Ident(String)
EmptyList
Cons(String, String)
Tuple(Vec<ResolvedPattern>)
Ctor(ResolvedCtor, Vec<String>)
Constructor pattern — Result.Ok(x), Shape.Circle(r),
Shape.Point. Resolved to a ResolvedCtor +
pattern-binding names.
Trait Implementations§
Source§impl Clone for ResolvedPattern
impl Clone for ResolvedPattern
Source§fn clone(&self) -> ResolvedPattern
fn clone(&self) -> ResolvedPattern
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 ResolvedPattern
impl Debug for ResolvedPattern
Source§impl PartialEq for ResolvedPattern
impl PartialEq for ResolvedPattern
Source§fn eq(&self, other: &ResolvedPattern) -> bool
fn eq(&self, other: &ResolvedPattern) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for ResolvedPattern
Auto Trait Implementations§
impl Freeze for ResolvedPattern
impl RefUnwindSafe for ResolvedPattern
impl Send for ResolvedPattern
impl Sync for ResolvedPattern
impl Unpin for ResolvedPattern
impl UnsafeUnpin for ResolvedPattern
impl UnwindSafe for ResolvedPattern
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