pub struct IncompleteFuture<Budget, F>(_)
where
F: Future,
Budget: Budgetable;
Expand description
A future that was budgeted using Context::run_with_budget()
that has not yet completed.
Implementations
sourceimpl<Budget, F> IncompleteFuture<Budget, F> where
F: Future,
Budget: Budgetable,
impl<Budget, F> IncompleteFuture<Budget, F> where
F: Future,
Budget: Budgetable,
sourcepub fn continue_with_additional_budget(
self,
additional_budget: usize
) -> BudgetedFuture<Budget, F>ⓘNotable traits for BudgetedFuture<Budget, F>impl<Budget, F> Future for BudgetedFuture<Budget, F> where
Budget: Budgetable,
F: Future, type Output = Progress<Budget, F>;
pub fn continue_with_additional_budget(
self,
additional_budget: usize
) -> BudgetedFuture<Budget, F>ⓘNotable traits for BudgetedFuture<Budget, F>impl<Budget, F> Future for BudgetedFuture<Budget, F> where
Budget: Budgetable,
F: Future, type Output = Progress<Budget, F>;
Budget: Budgetable,
F: Future, type Output = Progress<Budget, F>;
Adds additional_budget
to the remaining balance and continues
executing the future.
This function returns a future that must be awaited for anything to happen.
sourcepub fn wait_for_budget(self) -> WaitForBudgetFuture<Budget, F>ⓘNotable traits for WaitForBudgetFuture<Budget, F>impl<Budget, F> Future for WaitForBudgetFuture<Budget, F> where
F: Future,
Budget: Budgetable, type Output = Progress<Budget, F>;
pub fn wait_for_budget(self) -> WaitForBudgetFuture<Budget, F>ⓘNotable traits for WaitForBudgetFuture<Budget, F>impl<Budget, F> Future for WaitForBudgetFuture<Budget, F> where
F: Future,
Budget: Budgetable, type Output = Progress<Budget, F>;
F: Future,
Budget: Budgetable, type Output = Progress<Budget, F>;
Waits for additional budget to be allocated through
ReplenishableBudget::replenish()
.
Auto Trait Implementations
impl<Budget, F> !RefUnwindSafe for IncompleteFuture<Budget, F>
impl<Budget, F> !Send for IncompleteFuture<Budget, F>
impl<Budget, F> !Sync for IncompleteFuture<Budget, F>
impl<Budget, F> Unpin for IncompleteFuture<Budget, F>
impl<Budget, F> !UnwindSafe for IncompleteFuture<Budget, F>
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