async_ffi

Type Alias LocalFfiFuture

Source
pub type LocalFfiFuture<T> = LocalBorrowingFfiFuture<'static, T>;
Expand description

The FFI compatible future type without Send bound but with 'static lifetime.

See module level documentation for more details.

Aliased Type§

struct LocalFfiFuture<T> { /* private fields */ }

Implementations

Source§

impl<'a, T> LocalBorrowingFfiFuture<'a, T>

Source

pub fn new<F: Future<Output = T> + 'a>(fut: F) -> Self

Convert an std::future::Future into a FFI-compatible LocalFfiFuture.

Usually FutureExt::into_local_ffi is preferred and is identical to this method.

Trait Implementations

Source§

impl<T> Drop for LocalBorrowingFfiFuture<'_, T>

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more
Source§

impl<T> Future for LocalBorrowingFfiFuture<'_, T>

Source§

type Output = T

The type of value produced on completion.
Source§

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

Attempts to resolve the future to a final value, registering the current task for wakeup if the value is not yet available. Read more
Source§

impl<'a, T> GetStaticEquivalent_ for LocalBorrowingFfiFuture<'a, T>
where T: __StableAbi,

Source§

type StaticEquivalent = _static_LocalBorrowingFfiFuture<'static, <T as GetStaticEquivalent_>::StaticEquivalent>

The 'static equivalent of Self
Source§

impl<'a, T> StableAbi for LocalBorrowingFfiFuture<'a, T>
where T: __StableAbi,

Source§

const LAYOUT: &'static TypeLayout = _

The layout of the type provided by implementors.
Source§

type IsNonZeroType = False

Whether this type has a single invalid bit-pattern. Read more
Source§

const ABI_CONSTS: AbiConsts = _

const-equivalents of the associated types.