# dispatch-lite
Lightweight enum dispatch for trait objects — a minimal alternative to
[enum_dispatch](https://crates.io/crates/enum_dispatch) with a smaller
dependency footprint.
## Usage
Apply `#[dispatch_lite]` to a trait definition:
```rust
use dispatch_lite::dispatch_lite;
#[dispatch_lite]
trait Animal {
fn sound(&self) -> String;
}
struct Dog;
struct Cat;
impl Animal for Dog { fn sound(&self) -> String { "woof".into() } }
impl Animal for Cat { fn sound(&self) -> String { "meow".into() } }
enum Pet { Dog(Dog), Cat(Cat) }
```
## License
MIT OR Apache-2.0