sheen/subcommand

Types

pub type Builder(a) {
  Builder(name: String, command: cb.Command(a))
}

Constructors

  • Builder(name: String, command: cb.Command(a))

Functions

pub fn new(
  name: String,
  command: fn(Builder(Nil)) -> Result(Builder(a), String),
) -> sheen/subcommand.Builder(a)
pub fn optional(
  name: String,
  subcommand: fn(Builder(Nil)) -> Result(Builder(a), String),
  cont: fn(fn(fn(Option(a)) -> Decoder(b)) -> Decoder(b)) ->
    fn(Builder(Nil)) -> Result(Builder(b), String),
) -> fn(Builder(Nil)) -> Result(Builder(b), String)
pub fn required(
  commands: List(
    #(String, fn(Builder(Nil)) -> Result(Builder(a), String)),
  ),
  cont: fn(fn(fn(a) -> Decoder(b)) -> Decoder(b)) ->
    fn(Builder(Nil)) -> Result(Builder(b), String),
) -> fn(Builder(Nil)) -> Result(Builder(b), String)
Search Document