Trait iroh_blobs::util::LivenessTracker

source ·
pub trait LivenessTracker: Debug + Send + Sync + 'static {
    // Required methods
    fn on_clone(&self, inner: &HashAndFormat);
    fn on_drop(&self, inner: &HashAndFormat);
}
Expand description

A trait for things that can track liveness of blobs and collections.

This trait works together with TempTag to keep track of the liveness of a blob or collection.

It is important to include the format in the liveness tracking, since protecting a collection means protecting the blob and all its children, whereas protecting a raw blob only protects the blob itself.

Required Methods§

source

fn on_clone(&self, inner: &HashAndFormat)

Called on clone

source

fn on_drop(&self, inner: &HashAndFormat)

Called on drop

Implementations on Foreign Types§

source§

impl LivenessTracker for RwLock<TempCounterMap>

source§

fn on_clone(&self, content: &HashAndFormat)

source§

fn on_drop(&self, content: &HashAndFormat)

Implementors§