Struct iroh_blobs::util::TempTag
source · pub struct TempTag { /* private fields */ }
Expand description
A hash and format pair that is protected from garbage collection.
If format is raw, this will protect just the blob If format is collection, this will protect the collection and all blobs in it
Implementations§
source§impl TempTag
impl TempTag
sourcepub fn new(inner: HashAndFormat, on_drop: Option<Weak<dyn TagDrop>>) -> Self
pub fn new(inner: HashAndFormat, on_drop: Option<Weak<dyn TagDrop>>) -> Self
Create a new temp tag for the given hash and format
This should only be used by store implementations.
The caller is responsible for increasing the refcount on creation and to make sure that temp tags that are created between a mark phase and a sweep phase are protected.
sourcepub fn inner(&self) -> &HashAndFormat
pub fn inner(&self) -> &HashAndFormat
The hash of the pinned item
sourcepub fn format(&self) -> BlobFormat
pub fn format(&self) -> BlobFormat
The format of the pinned item
sourcepub fn hash_and_format(&self) -> HashAndFormat
pub fn hash_and_format(&self) -> HashAndFormat
The hash and format of the pinned item
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TempTag
impl !RefUnwindSafe for TempTag
impl Send for TempTag
impl Sync for TempTag
impl Unpin for TempTag
impl !UnwindSafe for TempTag
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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