Tags / 2 posts
#traits
2025 1 post
-
Alternative Blanket Implementations for a Single Rust Trait
Rust rejects overlapping blanket impls, but an associated type plus marker structs lets each type pick one of two implementations.
2023 1 post
-
Handling Rust enum variants with kinded crate
Generate DrinkKind, a data-free twin of the Drink enum, with all(), configurable Display casing and lenient FromStr from a single derive.