https://github.com/4ldo2/real-async-trait-rs
A proc macro for real async traits, using nightly-only existential types and generic associated types to work around the need for type erasure
https://github.com/4ldo2/real-async-trait-rs
async-trait existential-types generic-associated-types higher-kinded-types hkt proc-macro proc-macro-attributes
Last synced: about 2 months ago
JSON representation
A proc macro for real async traits, using nightly-only existential types and generic associated types to work around the need for type erasure
- Host: GitHub
- URL: https://github.com/4ldo2/real-async-trait-rs
- Owner: 4lDO2
- License: apache-2.0
- Created: 2020-07-14T09:43:39.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2022-06-11T15:46:31.000Z (almost 3 years ago)
- Last Synced: 2024-10-12T14:38:58.850Z (7 months ago)
- Topics: async-trait, existential-types, generic-associated-types, higher-kinded-types, hkt, proc-macro, proc-macro-attributes
- Language: Rust
- Homepage:
- Size: 64.5 KB
- Stars: 45
- Watchers: 3
- Forks: 3
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE-APACHE
Awesome Lists containing this project
README
# `#[real_async_trait]`
[](https://travis-ci.org/4lDO2/real-async-trait-rs)
[](https://crates.io/crates/real-async-trait)
[](https://docs.rs/real-async-trait/)This nightly-only crate provides a proof-of-concept proc macro attribute that
allows async functions within traits, without the possible runtime overhead of
wrapping everything in a `Box` and erasing the types. This is made possible
thanks to the unstable `generic_associated_types` and `type_alias_impl_trait`
nightly features.## License
Licensed under either of
* Apache License, Version 2.0
([LICENSE-APACHE](LICENSE-APACHE) or http://www.apache.org/licenses/LICENSE-2.0)
* MIT license
([LICENSE-MIT](LICENSE-MIT) or http://opensource.org/licenses/MIT)at your option.
## Contribution
Unless you explicitly state otherwise, any contribution intentionally submitted
for inclusion in the work by you, as defined in the Apache-2.0 license, shall be
dual licensed as above, without any additional terms or conditions.