pub struct BlockstorePinner<'a, B: Blockstore> { /* private fields */ }Expand description
Default pinner implementation using a blockstore and pin store
Implementations§
Trait Implementations§
Source§impl<'a, B: Blockstore> Pinner for BlockstorePinner<'a, B>
impl<'a, B: Blockstore> Pinner for BlockstorePinner<'a, B>
Source§fn is_pinned_with_mode(&self, cid: &Cid, mode: PinMode) -> PinResult<bool>
fn is_pinned_with_mode(&self, cid: &Cid, mode: PinMode) -> PinResult<bool>
Check if a CID is pinned with a specific mode
Source§fn pin(&mut self, cid: &Cid, mode: PinMode) -> PinResult<()>
fn pin(&mut self, cid: &Cid, mode: PinMode) -> PinResult<()>
Pin a CID with the specified mode
Source§fn pin_with_name(
&mut self,
cid: &Cid,
mode: PinMode,
name: Option<String>,
) -> PinResult<()>
fn pin_with_name( &mut self, cid: &Cid, mode: PinMode, name: Option<String>, ) -> PinResult<()>
Pin a CID with the specified mode and name
Source§fn list_pins(&self, mode: Option<PinMode>) -> PinResult<Vec<PinInfo>>
fn list_pins(&self, mode: Option<PinMode>) -> PinResult<Vec<PinInfo>>
List all pins, optionally filtered by mode
Source§fn update_pin(&mut self, old: &Cid, new: &Cid, unpin: bool) -> PinResult<()>
fn update_pin(&mut self, old: &Cid, new: &Cid, unpin: bool) -> PinResult<()>
Update a pin from old CID to new CID
Auto Trait Implementations§
impl<'a, B> !Freeze for BlockstorePinner<'a, B>
impl<'a, B> !RefUnwindSafe for BlockstorePinner<'a, B>
impl<'a, B> Send for BlockstorePinner<'a, B>
impl<'a, B> Sync for BlockstorePinner<'a, B>
impl<'a, B> Unpin for BlockstorePinner<'a, B>
impl<'a, B> UnsafeUnpin for BlockstorePinner<'a, B>
impl<'a, B> UnwindSafe for BlockstorePinner<'a, B>where
B: RefUnwindSafe,
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