Comments (2)
The implementation block for the trait needs to specify the actual types the GATs will have for that impl. An async block will have an anonymous type, so you need impl trait as you would have to write the future yourself otherwise (or box the underlying future, which is what async-trait
does). It could be possible to use this crate on stable to only define the trait under a Cargo feature, but I'm not sure when this crate will become obsolete, since async_fn_in_trait is already available on nightly.
from real-async-trait-rs.
thanks for the explanation
from real-async-trait-rs.
Related Issues (7)
- `generic_associated_types` stabilized HOT 1
- Multiple impl in one module do not compile HOT 1
- Generates invalid code after rust-lang/rust#89970 HOT 1
- dyn real_async_trait? HOT 2
- master and latest crates.io version not compiling
- type parameter is part of concrete type but not used in parameter list for the `impl Trait` type alias
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from real-async-trait-rs.