trait-set: trait aliases on stable Rust
Support for trait aliases on stable Rust.
Description
This crate provides support for trait aliases: a feature that is already supported by the Rust compiler, but is not stable yet.
The idea is simple: combine a group of traits under a single name. The simplest example is:
use trait_set;
trait_set!
The trait_set macro displayed here is the main entity of the crate:
it allows declaring multiple trait aliases, each of which is represented
as:
[visibility] trait [AliasName][<generics>] = [Element1] + [Element2] + ... + [ElementN];
Example
use trait_set;
trait_set!
Motivation
Rust is great, and it becomes even better over time. However, the time gap between proposing a new feature and getting it stabilized is way too big.
Trait aliases are a great example: 20% of the functionality will serve the needs of 80%. So, until they are stabilized, this crate will hopefully allow some folks to write more readable code.
Contributing
Feel free to submit a PR!
LICENSE
The trait-set library is licensed under the MIT License. See LICENSE for details.