pub type FfiFuture<T> = BorrowingFfiFuture<'static, T>;
Expand description
The FFI compatible future type with Send
bound and 'static
lifetime,
which is needed for most use cases.
See module level documentation for more details.
Aliased Type§
struct FfiFuture<T>(/* private fields */);
Implementations
Source§impl<'a, T> BorrowingFfiFuture<'a, T>
impl<'a, T> BorrowingFfiFuture<'a, T>
Sourcepub fn new<F: Future<Output = T> + Send + 'a>(fut: F) -> Self
pub fn new<F: Future<Output = T> + Send + 'a>(fut: F) -> Self
Convert an std::future::Future
implementing Send
into a FFI-compatible FfiFuture
.
Usually FutureExt::into_ffi
is preferred and is identical to this method.
Trait Implementations
Source§impl<T> Future for BorrowingFfiFuture<'_, T>
impl<T> Future for BorrowingFfiFuture<'_, T>
Source§impl<'a, T> GetStaticEquivalent_ for BorrowingFfiFuture<'a, T>where
T: __StableAbi,
impl<'a, T> GetStaticEquivalent_ for BorrowingFfiFuture<'a, T>where
T: __StableAbi,
Source§type StaticEquivalent = _static_BorrowingFfiFuture<'static, <T as GetStaticEquivalent_>::StaticEquivalent>
type StaticEquivalent = _static_BorrowingFfiFuture<'static, <T as GetStaticEquivalent_>::StaticEquivalent>
The
'static
equivalent of Self
Source§impl<'a, T> StableAbi for BorrowingFfiFuture<'a, T>where
T: __StableAbi,
impl<'a, T> StableAbi for BorrowingFfiFuture<'a, T>where
T: __StableAbi,
Source§const LAYOUT: &'static TypeLayout = _
const LAYOUT: &'static TypeLayout = _
The layout of the type provided by implementors.
Source§type IsNonZeroType = <LocalBorrowingFfiFuture<'a, T> as StableAbi>::IsNonZeroType
type IsNonZeroType = <LocalBorrowingFfiFuture<'a, T> as StableAbi>::IsNonZeroType
Whether this type has a single invalid bit-pattern. Read more
Source§const ABI_CONSTS: AbiConsts = _
const ABI_CONSTS: AbiConsts = _
const
-equivalents of the associated types.