Purpose

Chunked blob storage with deduplication, cache, writer/reader APIs, repair, metrics, and policy hooks. This page follows the real source shape for Trace Blobs and explains the workflow a developer is likely to use first.

Storage contract

Document persistence format, integrity checks, read/write ordering, idempotency, compaction or repair behavior, and how callers recover from partial failures. This section should answer what data is durable and what can be reconstructed.

Primary types to know

  • AllowAllBlobPolicy — models/trace-blobs/src/policy.rs
  • BlobConfig — models/trace-blobs/src/config.rs
  • BlobEntry — models/trace-blobs/src/chunk.rs
  • BlobId — models/trace-blobs/src/blob.rs
  • BlobInfo — models/trace-blobs/src/blob.rs
  • BlobMetadata — models/trace-blobs/src/blob.rs
  • BlobMetrics — models/trace-blobs/src/metrics.rs
  • BlobMetricsSnapshot — models/trace-blobs/src/metrics.rs
  • BlobReader — models/trace-blobs/src/reader.rs
  • BlobStore — models/trace-blobs/src/store.rs
  • BlobWriter — models/trace-blobs/src/writer.rs
  • ChunkCache — models/trace-blobs/src/cache.rs

Example shape

use trace_blobs::*;

// Minimal example skeleton. Replace placeholders with the concrete constructor
// listed on the API Surface page for this library.
async fn example() -> Result<(), Box<dyn std::error::Error>> {
    // 1. Build config or open storage.
    // 2. Execute one operation from this page.
    // 3. Assert the observable result before wiring peers or persistence.
    Ok(())
}

Release-quality documentation checklist

  • Every public type on the API Surface page has at least one sentence of behavior documentation.
  • Every fallible operation lists errors and recovery guidance.
  • Every networked example names the peer/session/topic lifecycle.
  • Every storage example names durability, repair, and deletion semantics.