Struct SyncFuture

struct SyncFuture<F> { ... }

Future which is Sync.

Examples

use sync_wrapper::{SyncWrapper, SyncFuture};

let fut = async { 1 };
let fut = SyncFuture::new(fut);

Implementations

impl<F: Future> SyncFuture<F>

fn new(inner: F) -> Self
fn into_inner(self: Self) -> F

impl<F> Freeze for SyncFuture<F>

impl<F> IntoFuture for SyncFuture<F>

fn into_future(self: Self) -> <F as IntoFuture>::IntoFuture

impl<F> RefUnwindSafe for SyncFuture<F>

impl<F> Send for SyncFuture<F>

impl<F> Sync for SyncFuture<F>

impl<F> Unpin for SyncFuture<F>

impl<F> UnsafeUnpin for SyncFuture<F>

impl<F> UnwindSafe for SyncFuture<F>

impl<F, T, E> TryFuture for SyncFuture<F>

fn try_poll(self: Pin<&mut F>, cx: &mut Context<'_>) -> Poll<<F as Future>::Output>

impl<F: Future> Future for SyncFuture<F>

fn poll(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<<Self as >::Output>

impl<T> Any for SyncFuture<F>

fn type_id(self: &Self) -> TypeId

impl<T> Borrow for SyncFuture<F>

fn borrow(self: &Self) -> &T

impl<T> BorrowMut for SyncFuture<F>

fn borrow_mut(self: &mut Self) -> &mut T

impl<T> Debug for SyncFuture<T>

fn fmt(self: &Self, f: &mut Formatter<'_>) -> Result

impl<T> From for SyncFuture<F>

fn from(t: T) -> T

Returns the argument unchanged.

impl<T, U> Into for SyncFuture<F>

fn into(self: Self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses to do.

impl<T, U> TryFrom for SyncFuture<F>

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

impl<T, U> TryInto for SyncFuture<F>

fn try_into(self: Self) -> Result<U, <U as TryFrom<T>>::Error>