Struct tantivy::FutureResult
source · [−]pub struct FutureResult<T> { /* private fields */ }
Expand description
FutureResult
is a handle that makes it possible to wait for the completion
of an ongoing task.
Contrary to some Future
, it does not need to be polled for the task to
progress. Dropping the FutureResult
does not cancel the task being executed
either.
- In a sync context, you can call
FutureResult::wait()
. The function does not rely onblock_on
. - In an async context, you can call simply use
FutureResult
as a future.
Implementations
sourceimpl<T> FutureResult<T>
impl<T> FutureResult<T>
Trait Implementations
sourceimpl<T> From<TantivyError> for FutureResult<T>
impl<T> From<TantivyError> for FutureResult<T>
sourcefn from(err: TantivyError) -> Self
fn from(err: TantivyError) -> Self
Converts to this type from the input type.
sourceimpl<T> Future for FutureResult<T>
impl<T> Future for FutureResult<T>
Auto Trait Implementations
impl<T> !RefUnwindSafe for FutureResult<T>
impl<T> Send for FutureResult<T> where
T: Send,
impl<T> !Sync for FutureResult<T>
impl<T> Unpin for FutureResult<T>
impl<T> !UnwindSafe for FutureResult<T>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Downcast for T where
T: Any,
impl<T> Downcast for T where
T: Any,
sourcefn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
Convert Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
. Read more
sourcefn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
Convert Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
. Read more
sourcefn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert &Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s. Read more
sourcefn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert &mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s. Read more
sourceimpl<F> IntoFuture for F where
F: Future,
impl<F> IntoFuture for F where
F: Future,
type Output = <F as Future>::Output
type Output = <F as Future>::Output
into_future
)The output that the future will produce on completion.
type IntoFuture = F
type IntoFuture = F
into_future
)Which kind of future are we turning this into?
sourcefn into_future(self) -> <F as IntoFuture>::IntoFuture
fn into_future(self) -> <F as IntoFuture>::IntoFuture
into_future
)Creates a future from a value.