pub struct SyncFuture<F> { /* private fields */ }
Expand description
Future
which is Sync
.
§Examples
use sync_wrapper::{SyncWrapper, SyncFuture};
let fut = async { 1 };
let fut = SyncFuture::new(fut);
Implementations§
source§impl<F: Future> SyncFuture<F>
impl<F: Future> SyncFuture<F>
pub fn new(inner: F) -> Self
pub fn into_inner(self) -> F
Trait Implementations§
source§impl<F: Future> Future for SyncFuture<F>
impl<F: Future> Future for SyncFuture<F>
Auto Trait Implementations§
impl<F> Freeze for SyncFuture<F>where
F: Freeze,
impl<F> RefUnwindSafe for SyncFuture<F>where
F: RefUnwindSafe,
impl<F> Send for SyncFuture<F>where
F: Send,
impl<F> Sync for SyncFuture<F>
impl<F> Unpin for SyncFuture<F>where
F: Unpin,
impl<F> UnwindSafe for SyncFuture<F>where
F: UnwindSafe,
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<F> IntoFuture for Fwhere
F: Future,
impl<F> IntoFuture for Fwhere
F: Future,
source§type IntoFuture = F
type IntoFuture = F
Which kind of future are we turning this into?
source§fn into_future(self) -> <F as IntoFuture>::IntoFuture
fn into_future(self) -> <F as IntoFuture>::IntoFuture
Creates a future from a value. Read more