pub enum IdrisPattern {
Wildcard,
Var(String),
Con(String, Vec<IdrisPattern>),
Lit(IdrisLiteral),
Tuple(Vec<IdrisPattern>),
Nil,
Cons(Box<IdrisPattern>, Box<IdrisPattern>),
As(String, Box<IdrisPattern>),
Implicit(Box<IdrisPattern>),
Dot(Box<IdrisExpr>),
}Expand description
A pattern in an Idris 2 function clause.
Variants§
Wildcard
Wildcard _.
Var(String)
Variable x.
Con(String, Vec<IdrisPattern>)
Constructor application Ctor p1 p2.
Lit(IdrisLiteral)
Literal pattern.
Tuple(Vec<IdrisPattern>)
Tuple pattern (p1, p2).
Nil
Nil [].
Cons(Box<IdrisPattern>, Box<IdrisPattern>)
Cons x :: xs.
As(String, Box<IdrisPattern>)
As-pattern n@p.
Implicit(Box<IdrisPattern>)
Implicit argument pattern {p}.
Dot(Box<IdrisExpr>)
Inaccessible (dot) pattern .t.
Trait Implementations§
Source§impl Clone for IdrisPattern
impl Clone for IdrisPattern
Source§fn clone(&self) -> IdrisPattern
fn clone(&self) -> IdrisPattern
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 IdrisPattern
impl Debug for IdrisPattern
Source§impl Display for IdrisPattern
impl Display for IdrisPattern
Source§impl PartialEq for IdrisPattern
impl PartialEq for IdrisPattern
impl StructuralPartialEq for IdrisPattern
Auto Trait Implementations§
impl Freeze for IdrisPattern
impl RefUnwindSafe for IdrisPattern
impl Send for IdrisPattern
impl Sync for IdrisPattern
impl Unpin for IdrisPattern
impl UnsafeUnpin for IdrisPattern
impl UnwindSafe for IdrisPattern
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