specialize
is an experimental Rust library for working with type specialization.
See the documentation for all provided macros and types, and more up-to-date syntax and information.
The constrain!()
macro can be used to add additional type bounds to an existing
generic parameter. For example, imagine you want to print out the debug representation
of a type without adding it to your generic bounds:
```rust
extern crate specialize;
fn somefunc
It can also be used as a replacement for Any
, allowing a generic type to become
its matching concrete type again.
The specialize! { }
macro allows for more advanced matching of types, but is
more cumbersome due to its syntax and implementation of an external function.
See the documentation for more details.