pub enum PermitKind {
OpenFile,
PendingMeta,
None,
}Expand description
Which backpressure pool a leaf’s pre-acquired permit comes from.
The two pools are deliberately distinct (see LeafPermit) — this enum
selects between them per tool, plus a None variant for metadata-only
walks (e.g. rcmp-style traversals) that take no leaf permit at all.
Unifying the choice of pool here — alongside LeafPermit and
preacquire_leaf_permit — is what lets the traversal driver own the
“drop the leaf permit before recursing into a directory” invariant in a
single place. Hand-coding that drop at every per-tool branch is the root
cause of the hold-and-wait deadlock class this lifecycle eliminates.
Variants§
OpenFile
File-descriptor backpressure (throttle::open_file_permit) — for
tools that hold an open fd across leaf work (copy, link).
PendingMeta
Task-spawn backpressure (throttle::pending_meta_permit) — for
recursive metadata-only walks that don’t hold an fd (chmod, rm).
None
The tool takes no leaf permit (it doesn’t gate at the leaf).
Trait Implementations§
Source§impl Clone for PermitKind
impl Clone for PermitKind
Source§fn clone(&self) -> PermitKind
fn clone(&self) -> PermitKind
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for PermitKind
Source§impl Debug for PermitKind
impl Debug for PermitKind
impl Eq for PermitKind
Source§impl PartialEq for PermitKind
impl PartialEq for PermitKind
impl StructuralPartialEq for PermitKind
Auto Trait Implementations§
impl Freeze for PermitKind
impl RefUnwindSafe for PermitKind
impl Send for PermitKind
impl Sync for PermitKind
impl Unpin for PermitKind
impl UnsafeUnpin for PermitKind
impl UnwindSafe for PermitKind
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request