rpc
only.Expand description
API for blobs management.
The main entry point is the Client
.
§Interacting with the local blob store
§Importing data
There are several ways to import data into the local blob store:
add_bytes
imports in memory data.add_stream
imports data from a stream of bytes.add_reader
imports data from an async reader.add_from_path
imports data from a file.
The last method imports data from a file on the local filesystem. This is the most efficient way to import large amounts of data.
§Exporting data
There are several ways to export data from the local blob store:
read_to_bytes
reads data into memory.read
creates a reader to read data from.export
eports data to a file on the local filesystem.
§Interacting with remote nodes
download
downloads data from a remote node. remote node.
§Interacting with the blob store itself
These are more advanced operations that are usually not needed in normal operation.
consistency_check
checks the internal consistency of the local blob store.validate
validates the locally stored data against their BLAKE3 hashes.delete_blob
deletes a blob from the local store.
§Batch operations
For complex update operations, there is a batch
API that
allows you to add multiple blobs in a single logical batch.
Operations in a batch return temporary tags that protect the added data from garbage collection as long as the batch is alive.
To store the data permanently, a temp tag needs to be upgraded to a
permanent tag using persist
or
persist_to
.
Re-exports§
pub use crate::net_protocol::DownloadMode;
Structs§
- AddDir
Opts - Options for adding a directory as a collection
- AddFile
Opts - Options for adding a file as a blob
- AddOutcome
- Outcome of a blob add operation.
- AddProgress
- Progress stream for blob add operations.
- AddReader
Opts - Options for adding a directory as a collection
- Batch
- A batch for write operations.
- Blob
Info - Information about a complete blob.
- Client
- Iroh blobs client.
- Collection
Info - Information about a stored collection.
- Download
Options - Options to configure a download request.
- Download
Outcome - Outcome of a blob download operation.
- Download
Progress - Progress stream for blob download operations.
- Export
Outcome - Outcome of a blob export operation.
- Export
Progress - Progress stream for blob export operations.
- Incomplete
Blob Info - Information about an incomplete blob.
- Reader
- Data reader for a single blob.
Enums§
- Blob
Status - Status information about a blob.
- Read
AtLen - Defines the way to read bytes.
- Wrap
Option - Whether to wrap the added data in a collection.
Type Aliases§
- MemClient
- Type alias for a memory-backed client.