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<T> Debug for SyncFuture<T>
impl<T> Debug for SyncFuture<T>
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