gleamgen/types/variant

Types

pub type Variant(a) {
  Variant(
    name: String,
    arguments: List(
      #(Option(String), types.GeneratedType(Unchecked)),
    ),
  )
}

Constructors

  • Variant(
      name: String,
      arguments: List(
        #(Option(String), types.GeneratedType(Unchecked)),
      ),
    )

Functions

pub fn new(name: String) -> Variant(#())
pub fn to_unchecked(variant: Variant(a)) -> Variant(Unchecked)
pub fn with_argument(
  old: Variant(a),
  name: Option(String),
  type_: GeneratedType(b),
) -> Variant(#(a, b))
pub fn with_arguments_unchecked(
  old: Variant(a),
  variants: List(#(Option(String), GeneratedType(Unchecked))),
) -> Variant(Unchecked)
Search Document