impl-trait-utils
impl-trait-utils copied to clipboard
Utilities for working with impl traits in Rust.
The core goal is to make `async fn` in trait and other RPITIT usable with dynamic dispatch via a proc macro, in a way similar to how it works with...
Resolves #17
Let's say that we want to create a `Send` variant of a trait but we don't need a non-`Send` variant of that trait at all. We could of course just...
From my understanding, as mentioned in the blog post [announcing `async fn` in `trait`](https://blog.rust-lang.org/2023/12/21/async-fn-rpit-in-traits.html#dynamic-dispatch ), this crate will support a macro to enable dynamic dispatch for `async trait`. I don't...
I have a trait such as this: ``` #[trait_variant::make(Test: Send)] trait LocalTest { async fn foo() -> i32 { 0 } } ``` but if fails with an error: ```...
that should fix #17
Hey everyone, it would be great if we could have a shorthand for making a trait `Send` only, like this: ```rust #[trait_variant::only_send] pub trait SomeTrait { async fn hello() ->...
This issue relevant after #20 merges, but is not a result of the PR. Assuming #20, the following fails to compile: ```rust enum Abort { Yes, No, } #[trait_variant::make(Example: Send)]...
Suppose you wanted to write a tower-esque trait using RPITIT: ```rust pub trait LocalService { type Response; type Error; async fn execute(self, request: Request) -> Result; } ``` This now...
Hi! It has been some time that async trait have been released. Some crates have moved to it, but for some people the transition is not easy. It would be...