pub struct ProviderCallBudget { /* private fields */ }Expand description
A shared limit on underlying provider turns across cloned requests.
Transports must consume one slot immediately before each provider attempt, including repairs and restart retries. Failed attempts also consume a slot.
Implementations§
Source§impl ProviderCallBudget
impl ProviderCallBudget
Sourcepub fn ensure_available(&self) -> Result<(), OneShotError>
pub fn ensure_available(&self) -> Result<(), OneShotError>
Checks for exhaustion without charging a turn at an outer boundary.
§Errors
Returns an input-size reduction error when no slots remain.
Trait Implementations§
Source§impl Clone for ProviderCallBudget
impl Clone for ProviderCallBudget
Source§fn clone(&self) -> ProviderCallBudget
fn clone(&self) -> ProviderCallBudget
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for ProviderCallBudget
impl RefUnwindSafe for ProviderCallBudget
impl Send for ProviderCallBudget
impl Sync for ProviderCallBudget
impl Unpin for ProviderCallBudget
impl UnsafeUnpin for ProviderCallBudget
impl UnwindSafe for ProviderCallBudget
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