Comments (5)
As far as I tried 1.75.0, the official async trait
isn't object-safe for now while this crate is. This is the huge advantage of this crate when using Arc<dyn Trait + Send +Sync>
style DI. This is why I'd like @dtolnay to keep maintaining this crate until the official async trait gets object-safe.
from async-trait.
And here 1.75.0 is. Maybe consider writing a sentence or two on migrating.
from async-trait.
Thanks so much to @dtolnay and contributors for this crate! This was so useful to have while waiting for this to happen!
from async-trait.
From official doc, users can use #[trait_variant::make]
if they want to swap to AFIT?
From developer side, that's just migrate from one macro to another. I think I will still use #[async_macro] until all of my dependencies support the new feature?
from async-trait.
until the official async trait gets object-safe
This is unlikely to be possible without explicitly bounding Self: Sized
in all of the RPITI methods, which prevents them from being accessible through a trait object
from async-trait.
Related Issues (20)
- Different behaviour between non-trait async implementation and async-trait HOT 2
- Do not require Sync on unused shared reference arguments
- Nested `_` and `..` patterns under 2018 edition can trigger rust_2021_compatibility warning
- Clippy lint `async_returns_async` fails if you return an awaitable type
- Weird interaction with `single_use_lifetimes` HOT 1
- Possibly optimize simple function body?
- using async_trait in tuple generic param, error: lifetime may not live long enough HOT 2
- `#[cfg(..)]` gated impl parameters with lifetimes cause inconsistent lifetime bounds HOT 1
- Regression in associated type parsing in `0.1.67` HOT 1
- Poor error message when argument types mismatch HOT 1
- Want way to detect recursive impls HOT 2
- Feature: Adding Sync bound on Future HOT 2
- Feature: Catch unconditional_recursion HOT 2
- [Bug?] Error "expected trait impl" on associated impls HOT 2
- Lifetime bounds on method do not match the trait declaration HOT 1
- Issue with reference lifetimes in closures HOT 1
- Using async-trait with nightly-2024-03-04 triggers `unused-qualifications` lint
- Don't include ignored variables in async block. HOT 4
- `async fn() -> !` triggers "unreachable expression" warning
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 async-trait.