pub struct ProtectCallbackHandler(/* private fields */);
Expand description
The handler for a blobs protection callback.
Implementations§
Source§impl ProtectCallbackHandler
impl ProtectCallbackHandler
Sourcepub fn new() -> (Self, ProtectCb)
pub fn new() -> (Self, ProtectCb)
Creates a callback and handler to manage blob protection.
The returned [ProtectCb
] must be passed set in the GcConfig
of the [iroh_blobs
] store where
the blobs for hashes in documents are persisted. The ProtectCallbackHandler
must be passed to
Builder::protect_handler
(or Engine::spawn
). This will then ensure that hashes referenced
in docs will not be deleted from the blobs store, and will be garbage collected if they no longer appear
in any doc.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ProtectCallbackHandler
impl RefUnwindSafe for ProtectCallbackHandler
impl Send for ProtectCallbackHandler
impl Sync for ProtectCallbackHandler
impl Unpin for ProtectCallbackHandler
impl UnwindSafe for ProtectCallbackHandler
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