vesta

Crates.iovesta
lib.rsvesta
version0.1.0
sourcesrc
created_at2021-04-08 18:56:55.190777
updated_at2021-04-08 18:56:55.190777
descriptionExtensible pattern matching
homepagehttps://github.com/boltlabs-inc/vesta
repositoryhttps://github.com/boltlabs-inc/vesta
max_upload_size
id380997
size15,536
J. Ayo Akinyele (jakinyele)

documentation

README

Vesta

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.

Commit count: 33

cargo fmt