pub struct GraphRemoveAudit {
pub node_count: usize,
pub mount_count: usize,
}Expand description
Result of Graph::unmount / Graph::remove.
§Best-effort under concurrent mutation
Counts are a point-in-time best-effort snapshot of the detached
subtree, NOT a transaction-isolated tally. The unmount flow detaches
the child from the parent BEFORE auditing, so the only writers that
can race the count are threads holding a Graph clone of the
detached child (e.g., calling state(...) / mount_new(...) on
the child between detach and audit). [audit_of] recursively walks
the subtree, dropping each level’s inner lock before descending —
concurrent mutation within that window may shift the tally by the
number of nodes/mounts added or removed.
Why deliberate v1: the single-owner graphrefly_core::OwnedCore
model (D248/D255 actor-thread) makes the “Graph clone on another
thread” scenario possible but narrow; a single-locked walk would
require a cross-graph lock-ordering pass (parent + every descendant)
that composes against state() / mount_new() re-entry — overkill
for diagnostic data the spec frames as best-effort. If a real
consumer needs transaction-isolated audit counts, lift via either a
cross-graph multi-level lock-ordering scheme OR a copy-on-write
epoch on the subtree (gated on D196 consumer pressure).
Fields§
§node_count: usizeNumber of nodes torn down (own + recursive into mounts).
mount_count: usizeNumber of mounts torn down (recursive count).
Trait Implementations§
Source§impl Clone for GraphRemoveAudit
impl Clone for GraphRemoveAudit
Source§fn clone(&self) -> GraphRemoveAudit
fn clone(&self) -> GraphRemoveAudit
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for GraphRemoveAudit
impl Debug for GraphRemoveAudit
Source§impl PartialEq for GraphRemoveAudit
impl PartialEq for GraphRemoveAudit
Source§fn eq(&self, other: &GraphRemoveAudit) -> bool
fn eq(&self, other: &GraphRemoveAudit) -> bool
self and other values to be equal, and is used by ==.impl Eq for GraphRemoveAudit
impl StructuralPartialEq for GraphRemoveAudit
Auto Trait Implementations§
impl Freeze for GraphRemoveAudit
impl RefUnwindSafe for GraphRemoveAudit
impl Send for GraphRemoveAudit
impl Sync for GraphRemoveAudit
impl Unpin for GraphRemoveAudit
impl UnsafeUnpin for GraphRemoveAudit
impl UnwindSafe for GraphRemoveAudit
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.