-
Notifications
You must be signed in to change notification settings - Fork 192
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New-type all the orchestrator futures #3055
Conversation
A new generated diff is ready to view.
A new doc preview is ready to view. |
pub fn new_boxed( | ||
future: std::pin::Pin< | ||
Box<dyn std::future::Future<Output = Result<$output, $err>> + Send>, | ||
>, | ||
) -> Self { | ||
Self { | ||
inner: aws_smithy_async::future::now_or_later::NowOrLater::new(future), | ||
} | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we use the downcast trick here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think it would work so well here since the Pin<Box<...>>
type would need to be just right, and the chances of that are slim.
A new generated diff is ready to view.
A new doc preview is ready to view. |
5f6baa6
to
1ec04d1
Compare
A new generated diff is ready to view.
A new doc preview is ready to view. |
This PR replaces the
Future
type-alias that was pointing toNowOrLater
with a new-type for each trait that returns a future.By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.