Struct LocalFutureObj
struct LocalFutureObj<'a, T> { ... }
A custom trait object for polling futures, roughly akin to
Box<dyn Future<Output = T> + 'a>.
This custom trait object was introduced as currently it is not possible to
take dyn Trait by value and Box<dyn Trait> is not available in no_std
contexts.
Implementations
impl<'a, T> LocalFutureObj<'a, T>
fn new<F: UnsafeFutureObj<'a, T> + 'a>(f: F) -> SelfCreate a
LocalFutureObjfrom a custom trait object representation.unsafe fn into_future_obj(self: Self) -> FutureObj<'a, T>Converts the
LocalFutureObjinto aFutureObj.Safety
To make this operation safe one has to ensure that the
UnsafeFutureObjinstance from which thisLocalFutureObjwas created actually implementsSend.
impl<'a> From for LocalFutureObj<'a, ()>
fn from(boxed: Pin<Box<dyn Future<Output = ()> + 'a>>) -> Self
impl<'a> From for LocalFutureObj<'a, ()>
fn from(boxed: Box<dyn Future<Output = ()> + 'a>) -> Self
impl<'a, F: Future<Output = ()> + 'a> From for LocalFutureObj<'a, ()>
fn from(boxed: Box<F>) -> Self
impl<'a, F: Future<Output = ()> + 'a> From for LocalFutureObj<'a, ()>
fn from(boxed: Pin<Box<F>>) -> Self
impl<'a, T> Freeze for LocalFutureObj<'a, T>
impl<'a, T> From for LocalFutureObj<'a, T>
fn from(f: FutureObj<'a, T>) -> Self
impl<'a, T> RefUnwindSafe for LocalFutureObj<'a, T>
impl<'a, T> Send for LocalFutureObj<'a, T>
impl<'a, T> Sync for LocalFutureObj<'a, T>
impl<'a, T> UnsafeUnpin for LocalFutureObj<'a, T>
impl<'a, T> UnwindSafe for LocalFutureObj<'a, T>
impl<F> IntoFuture for LocalFutureObj<'a, T>
fn into_future(self: Self) -> <F as IntoFuture>::IntoFuture
impl<T> Any for LocalFutureObj<'a, T>
fn type_id(self: &Self) -> TypeId
impl<T> Borrow for LocalFutureObj<'a, T>
fn borrow(self: &Self) -> &T
impl<T> BorrowMut for LocalFutureObj<'a, T>
fn borrow_mut(self: &mut Self) -> &mut T
impl<T> Debug for LocalFutureObj<'_, T>
fn fmt(self: &Self, f: &mut Formatter<'_>) -> Result
impl<T> Drop for LocalFutureObj<'_, T>
fn drop(self: &mut Self)
impl<T> From for LocalFutureObj<'a, T>
fn from(t: T) -> TReturns the argument unchanged.
impl<T> Future for LocalFutureObj<'_, T>
fn poll(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<T>
impl<T> Unpin for LocalFutureObj<'_, T>
impl<T, U> Into for LocalFutureObj<'a, T>
fn into(self: Self) -> UCalls
U::from(self).That is, this conversion is whatever the implementation of
[From]<T> for Uchooses to do.
impl<T, U> TryFrom for LocalFutureObj<'a, T>
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
impl<T, U> TryInto for LocalFutureObj<'a, T>
fn try_into(self: Self) -> Result<U, <U as TryFrom<T>>::Error>