knave 0.14.22

A Lisp programming language for humans and agents that infers types and ownership and compiles to readable Rust
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
pub enum PatternFields<'a> {
    Named(Vec<&'a str>),
    Positional(usize),
}

impl PatternFields<'_> {
    pub fn count(&self) -> usize {
        match self {
            Self::Named(names) => names.len(),
            Self::Positional(count) => *count,
        }
    }
}