pub struct DavTraversalBudget { /* private fields */ }Expand description
Allocation-free recursive traversal budget state.
Implementations§
Source§impl DavTraversalBudget
impl DavTraversalBudget
Sourcepub fn new(limits: DavTraversalLimits) -> Result<Self, DavTraversalError>
pub fn new(limits: DavTraversalLimits) -> Result<Self, DavTraversalError>
§Errors
Returns DavTraversalError when any required traversal limit is zero.
pub const fn progress(self) -> DavTraversalProgress
Sourcepub fn checkpoint(
&self,
cancellation: &impl DavCancellation,
) -> Result<(), DavTraversalError>
pub fn checkpoint( &self, cancellation: &impl DavCancellation, ) -> Result<(), DavTraversalError>
§Errors
Returns DavTraversalError when cancellation has been requested.
Sourcepub fn visit(&mut self, depth: usize) -> Result<(), DavTraversalError>
pub fn visit(&mut self, depth: usize) -> Result<(), DavTraversalError>
§Errors
Returns DavTraversalError when depth or visited-resource limits are exceeded.
Sourcepub fn reserve_work(
&mut self,
additional: usize,
) -> Result<(), DavTraversalError>
pub fn reserve_work( &mut self, additional: usize, ) -> Result<(), DavTraversalError>
§Errors
Returns DavTraversalError when the queued-work counter would exceed its limit.
pub fn complete_work(&mut self)
Sourcepub fn record_failure(&mut self) -> Result<(), DavTraversalError>
pub fn record_failure(&mut self) -> Result<(), DavTraversalError>
§Errors
Returns DavTraversalError when the failure counter would exceed its limit.
pub fn record_completed_mutation(&mut self)
Trait Implementations§
Source§impl Clone for DavTraversalBudget
impl Clone for DavTraversalBudget
Source§fn clone(&self) -> DavTraversalBudget
fn clone(&self) -> DavTraversalBudget
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for DavTraversalBudget
impl Debug for DavTraversalBudget
Source§impl PartialEq for DavTraversalBudget
impl PartialEq for DavTraversalBudget
impl Copy for DavTraversalBudget
impl Eq for DavTraversalBudget
impl StructuralPartialEq for DavTraversalBudget
Auto Trait Implementations§
impl Freeze for DavTraversalBudget
impl RefUnwindSafe for DavTraversalBudget
impl Send for DavTraversalBudget
impl Sync for DavTraversalBudget
impl Unpin for DavTraversalBudget
impl UnwindSafe for DavTraversalBudget
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.