ferripfs-pinning
IPFS content pinning - prevent blocks from being garbage collected.
Note: This crate is part of ferripfs, a Rust port of Kubo (the Go IPFS implementation). The implementation follows Kubo's boxo/pinning package. See Kubo's pinning documentation for conceptual details.
Features
- Pin Types: Direct, Recursive, and Indirect pins
- Named Pins: Associate names with pinned content
- Pin Verification: Verify all pinned blocks exist
- GC Protection: Pinned content survives garbage collection
Usage
use ;
// Create a pinner
let pinner = new?;
// Add a recursive pin (pins block and all references)
pinner.pin_with_name?;
// Add a direct pin (pins only the specified block)
pinner.pin_with_name?;
// List all pins
for pin in pinner.list_pins?
// Remove a pin
pinner.unpin?;
// Verify all pins are intact
let results = pinner.verify?;
for result in results
Pin Types
| Type | Description |
|---|---|
Direct |
Only the specified block is pinned |
Recursive |
Block and all referenced blocks are pinned |
Indirect |
Block is referenced by a recursive pin |
License
Dual-licensed under MIT and Apache-2.0.