strand-blobs · blob
Source declarations, signatures and documentation for blob.
Reviewed implementation boundary: The current GC path quarantines records without reclaiming their stored files. Check actual writer/list/report interfaces and partial-write behavior in /libraries/strand-blobs/overview.
Source: sigil/weave/models/strand-blobs/src/blob.rs. SHA-256: c9d9d1114015a41ca227500f06e78f2ca0ee5bd469a33d8c42d526e629d4a231.
This reference follows declared source modules, retains conditional attributes, and includes public declarations and implementation methods. Private-module re-exports and trait resolution require the compiler; this is a source reference, not a claim that every listed item is a root import. Function bodies and constant values are omitted.
blob::BlobId
Unique identifier for a blob (content hash)
#[derive(Debug, Clone, Copy, Hash, PartialEq, Eq, Serialize, Deserialize)]
pub struct BlobId(pub [u8; 32]);Source line: 8.
blob::BlobId::new
Create a new blob ID from bytes
pub fn new(bytes: [u8; 32]) -> Self;Source line: 12.
blob::BlobId::as_bytes
Get the bytes of the blob ID
pub fn as_bytes(&self) -> &[u8; 32];Source line: 17.
blob::BlobId::to_hex
Convert to hex string
pub fn to_hex(&self) -> String;Source line: 22.
blob::BlobId::from_hex
Parse from hex string
pub fn from_hex(s: &str) -> Result<Self, hex::FromHexError>;Source line: 27.
blob::ChunkRef
Reference to a chunk stored in the data strand with integrity metadata
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct ChunkRef {
/// Index of the chunk in the data strand (packed bytes)
pub index: u64,
/// Uncompressed content size
pub length: u32,
/// Stored (packed) size
pub packed_length: u64,
/// Blake3 hash of the uncompressed content
pub content_hash: [u8; 32],
/// Blake3 hash of the stored (packed) bytes
pub packed_hash: [u8; 32]
}Source line: 46.
blob::BlobMetadata
Metadata for a stored blob
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct BlobMetadata {
/// Unique blob ID (content hash)
pub id: BlobId,
/// Total size in bytes
pub size: u64,
/// Chunk size used
pub chunk_size: u32,
/// List of chunk indices in data strand (deprecated - use chunk_refs)
#[serde(default)]
pub chunks: Vec<u64>,
/// Chunk references with integrity information
#[serde(default)]
pub chunk_refs: Vec<ChunkRef>,
/// Optional user metadata
pub metadata: Option<serde_json::Value>,
/// Creation timestamp (Unix epoch seconds)
pub created_at: u64,
/// Compression type used (if any)
pub compression: Option<String>
}Source line: 65.
blob::DeletionMarker
Durable deletion marker appended to the metadata strand during delete. Used by GC/repair to identify blobs that should no longer be referenced.
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct DeletionMarker {
pub id: BlobId,
pub deleted_at: u64
}Source line: 96.
blob::BlobInfo
Basic blob information for listing
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct BlobInfo {
/// Blob identifier
pub id: BlobId,
/// Size in bytes
pub size: u64,
/// Creation timestamp
pub created_at: u64,
/// User metadata (if any)
pub metadata: Option<serde_json::Value>
}Source line: 103.