pub enum FSharpPattern {
Wildcard,
Var(String),
Lit(String),
Tuple(Vec<FSharpPattern>),
Ctor(String, Vec<FSharpPattern>),
FsList(Vec<FSharpPattern>),
Cons(Box<FSharpPattern>, Box<FSharpPattern>),
As(Box<FSharpPattern>, String),
When(Box<FSharpPattern>, Box<FSharpExpr>),
}Expand description
An F# pattern used in match arms.
Variants§
Wildcard
Wildcard _
Var(String)
Variable binding name
Lit(String)
Literal pattern
Tuple(Vec<FSharpPattern>)
Tuple pattern (a, b)
Ctor(String, Vec<FSharpPattern>)
Constructor pattern Some x / MyCase(a, b)
FsList(Vec<FSharpPattern>)
List pattern [a; b]
Cons(Box<FSharpPattern>, Box<FSharpPattern>)
Cons pattern h :: t
As(Box<FSharpPattern>, String)
As-pattern p as name
When(Box<FSharpPattern>, Box<FSharpExpr>)
Guard: when condition
Trait Implementations§
Source§impl Clone for FSharpPattern
impl Clone for FSharpPattern
Source§fn clone(&self) -> FSharpPattern
fn clone(&self) -> FSharpPattern
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 moreAuto Trait Implementations§
impl Freeze for FSharpPattern
impl RefUnwindSafe for FSharpPattern
impl Send for FSharpPattern
impl Sync for FSharpPattern
impl Unpin for FSharpPattern
impl UnsafeUnpin for FSharpPattern
impl UnwindSafe for FSharpPattern
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