vesta 0.1.0

Extensible pattern matching
Documentation
  • Coverage
  • 100%
    16 out of 16 items documented8 out of 13 items with examples
  • Size
  • Source code size: 19 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 4.86 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 15s Average build duration of successful builds.
  • all releases: 15s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Homepage
  • boltlabs-inc/vesta
    1 0 2
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • jakinyele plaidfinch

Rust license: MIT crates.io docs.rs documentation

A vesta, otherwise known as a match case, is a small container for matches, named after the Roman goddess of the hearth.

Vesta is a crate for extensibly matching cases in Rust.

By implementing Match and [Case] for some type (or better yet, correctly deriving them using the Match derive macro), you can pattern-match on that type using the [case!] macro almost like using the match keyword built into Rust.

However, Vesta's [case!] macro is more general than match, because [Match] and [Case] are traits! This means you can enable pattern-matching for types which are not literally implemented as enums, and you can write code which is generic over any type that is pattern-matchable.