Expand description
Safe, zero-cost downcasting for limited compile-time specialization.
This crate works fully on stable Rust, and also does not require the standard library.
Castaway provides the following key macros:
cast
: Attempt to cast the result of an expression into a given concrete type.match_type
: Match the result of an expression against multiple concrete types.
Macrosยง
- Match the result of an expression against multiple concrete types. You can write multiple match arms in the following syntax: