Struct async_ffi::LocalBorrowingFfiFuture [−][src]
#[repr(C)]pub struct LocalBorrowingFfiFuture<'a, T> { /* fields omitted */ }
Expand description
The FFI compatible future type without Send
bound.
Non-Send
Future
s can only be converted into LocalFfiFuture
. It is not able to be
spawn
d in a multi-threaded runtime, but is useful for thread-local futures, single-threaded
runtimes, or single-threaded targets like wasm
.
See module level documentation for more details.
Implementations
impl<'a, T> LocalBorrowingFfiFuture<'a, T>
[src]
impl<'a, T> LocalBorrowingFfiFuture<'a, T>
[src]pub fn new<F: Future<Output = T> + 'a>(fut: F) -> Self
[src]
pub fn new<F: Future<Output = T> + 'a>(fut: F) -> Self
[src]Convert a Rust Future
into a FFI-compatible LocalFfiFuture
.
Usually into_local_ffi
is preferred and is identical to this method.
Trait Implementations
impl<T> Drop for LocalBorrowingFfiFuture<'_, T>
[src]
impl<T> Drop for LocalBorrowingFfiFuture<'_, T>
[src]impl<T> Future for LocalBorrowingFfiFuture<'_, T>
[src]
impl<T> Future for LocalBorrowingFfiFuture<'_, T>
[src]Auto Trait Implementations
impl<'a, T> RefUnwindSafe for LocalBorrowingFfiFuture<'a, T>
impl<'a, T> !Send for LocalBorrowingFfiFuture<'a, T>
impl<'a, T> !Sync for LocalBorrowingFfiFuture<'a, T>
impl<'a, T> Unpin for LocalBorrowingFfiFuture<'a, T>
impl<'a, T> UnwindSafe for LocalBorrowingFfiFuture<'a, T>
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<F> FutureExt for F where
F: Future,
[src]
impl<F> FutureExt for F where
F: Future,
[src]fn into_ffi<'a>(self) -> BorrowingFfiFuture<'a, Self::Output>ⓘNotable traits for BorrowingFfiFuture<'_, T>
impl<T> Future for BorrowingFfiFuture<'_, T> type Output = T;
where
Self: Send + 'a,
[src]
fn into_ffi<'a>(self) -> BorrowingFfiFuture<'a, Self::Output>ⓘNotable traits for BorrowingFfiFuture<'_, T>
impl<T> Future for BorrowingFfiFuture<'_, T> type Output = T;
where
Self: Send + 'a,
[src]Convert a Rust Future
implementing Send
into a FFI-compatible FfiFuture
.
fn into_local_ffi<'a>(self) -> LocalBorrowingFfiFuture<'a, Self::Output>ⓘNotable traits for LocalBorrowingFfiFuture<'_, T>
impl<T> Future for LocalBorrowingFfiFuture<'_, T> type Output = T;
where
Self: 'a,
[src]
fn into_local_ffi<'a>(self) -> LocalBorrowingFfiFuture<'a, Self::Output>ⓘNotable traits for LocalBorrowingFfiFuture<'_, T>
impl<T> Future for LocalBorrowingFfiFuture<'_, T> type Output = T;
where
Self: 'a,
[src]Convert a Rust Future
into a FFI-compatible LocalFfiFuture
.
impl<F> IntoFuture for F where
F: Future,
[src]
impl<F> IntoFuture for F where
F: Future,
[src]type Output = <F as Future>::Output
type Output = <F as Future>::Output
into_future
)The output that the future will produce on completion.
type Future = F
type Future = F
into_future
)Which kind of future are we turning this into?
pub fn into_future(self) -> <F as IntoFuture>::Future
[src]
pub fn into_future(self) -> <F as IntoFuture>::Future
[src]into_future
)Creates a future from a value.