caffeine_lang/common/refinement_types

Types

Refinement types enforce additional compile-time validations.

pub type RefinementTypes(accepted) {
  OneOf(accepted, set.Set(String))
}

Constructors

  • OneOf(accepted, set.Set(String))

    Restricts values to a user-defined set. I.E. String { x | x in { pasta, pizza, salad } }

    At this time we only support:

    • Primitives: Integer, Float, String
    • Modifiers: Defaulted with Integer, Float, String
Search Document