Enum ketos::function::Arity [] [src]

pub enum Arity {
    Exact(u32),
    Min(u32),
    Range(u32u32),
}

Describes the number of arguments a function may accept.

Variants

Exact(u32)

Function accepts exactly n arguments

Min(u32)

Function accepts at least n arguments

Range(u32u32)

Function accepts an inclusive range of arguments

Methods

impl Arity
[src]

fn accepts(&self, n: u32) -> bool

Returns whether this arity may accept n arguments.

Trait Implementations

impl PartialEq for Arity
[src]

fn eq(&self, __arg_0: &Arity) -> bool

This method tests for self and other values to be equal, and is used by ==. Read more

fn ne(&self, __arg_0: &Arity) -> bool

This method tests for !=.

impl Eq for Arity
[src]

impl Debug for Arity
[src]

fn fmt(&self, __arg_0: &mut Formatter) -> Result

Formats the value using the given formatter.

impl Clone for Arity
[src]

fn clone(&self) -> Arity

Returns a copy of the value. Read more

fn clone_from(&mut self, source: &Self)
1.0.0

Performs copy-assignment from source. Read more

impl Copy for Arity
[src]

impl Display for Arity
[src]

fn fmt(&self, f: &mut Formatter) -> Result

Formats the value using the given formatter.