pub struct BudgetBuilder { /* private fields */ }Expand description
Builder for a root or child Budget.
Implementations§
Source§impl BudgetBuilder
impl BudgetBuilder
Sourcepub fn limit(self, resource: Resource, amount: u64) -> Self
pub fn limit(self, resource: Resource, amount: u64) -> Self
Adds a local resource limit.
Configuring the same resource twice makes BudgetBuilder::build fail.
Sourcepub fn deadline_at(self, deadline: Instant) -> Self
pub fn deadline_at(self, deadline: Instant) -> Self
Sets an absolute monotonic deadline.
Sourcepub fn deadline_after(self, duration: Duration) -> Self
pub fn deadline_after(self, duration: Duration) -> Self
Sets a deadline relative to the instant at which the budget is built.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for BudgetBuilder
impl RefUnwindSafe for BudgetBuilder
impl Send for BudgetBuilder
impl Sync for BudgetBuilder
impl Unpin for BudgetBuilder
impl UnsafeUnpin for BudgetBuilder
impl UnwindSafe for BudgetBuilder
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more