This page summarizes the public Rust API surface of the Cobble crates.
cobble (Core Crate)
Primary Types
Type
Description
SingleDb
Single-machine embedded database (wraps Db + Coordinator)
Db
Shard database for distributed deployments
ReadOnlyDb
Read-only snapshot access
Reader
Snapshot-following read proxy (visibility advances by snapshot cadence)
DbCoordinator
Global snapshot coordinator
Scan Types
Type
Description
ScanPlan
Distributed scan plan from a global snapshot
ScanSplit
Serializable unit of scan work (one per shard)
ScanSplitPartition
Pair of before / after splits around one bucket/key boundary
ScanSplitScanner
Iterator over key-value pairs within a split
Configuration Types
Type
Description
Config
Main database configuration
CoordinatorConfig
Coordinator configuration
VolumeDescriptor
Storage volume descriptor
VolumeUsageKind
Volume usage kind enum
ReadOptions
Point lookup options
ScanOptions
Scan/iteration options
WriteOptions
Write operation options
Filesystem Extension Types
Type / Function
Description
ProcessFileSystemRequest
Request context passed to process-level custom filesystem resolution (original and normalized base dir, parsed URL, credentials, custom options).
ProcessFileSystemRegistry
Trait for host-side custom filesystem resolution (try_init).
register_process_custom_file_system_registry(...)
Registers one process-level custom filesystem registry used as fallback when built-in resolution/access fails.
clear_process_custom_file_system_registry()
Clears the current process-level custom filesystem registry.
Resolution order is built-in first, then process-level fallback. If a custom registry is configured, Cobble also falls back when built-in filesystem initialization succeeds but the initial access probe fails.
Metadata & Schema Types
Type
Description
Schema
Current raw schema with family-local metadata
SchemaBuilder
Schema evolution builder; column-family aware via optional family arguments
ShardSnapshotInput
Shard snapshot DTO used by the coordinator
GlobalSnapshotManifest
Materialized global snapshot manifest
Column Family Model
The default family is default.
Plain raw put / merge / delete / get / scan APIs use the default family.
Raw Rust selects other families through WriteOptions::with_column_family, ReadOptions::for_column_in_family / for_columns_in_family / with_column_family, and ScanOptions::with_column_family.
Named families are created through SchemaBuilder, not through config.
Distributed routing stays bucket-only, but for Reader and ScanPlan, the column family should be selected through options. That means only one family is read or scan per operation.
ColumnFamilyOptions and TTL Behavior
SchemaBuilder::set_column_family_options allows setting ColumnFamilyOptions for each family, which currently only includes value_has_ttl. Setting this to false allows the cobble optimize storage for values without TTL.
value_has_ttl controls whether write-time TTL input is effective in that family:
open_from_snapshot preserves the source db identity and snapshot directory. open_new_with_snapshot restores from the source snapshot but assigns a fresh db id and starts a new snapshot chain. open_new_with_manifest_path does the same thing when your checkpoint metadata already stores the exact source manifest path.
Snapshot lifecycle notes:
db.snapshot() returns a snapshot id after the async materialization flow has been scheduled.
db.snapshot_with_callback(...) delivers a ShardSnapshotInput once manifest publication finishes.
db.cancel_snapshot(snapshot_id) only succeeds before manifest publication completes.
db.expire_snapshot(snapshot_id) releases snapshot ownership and file references.
db.retain_snapshot(snapshot_id) keeps a completed snapshot alive across retention passes.
ScanPlan::new(manifest)->ScanPlan// bucket-onlyplan.splits()->Vec<ScanSplit>split.split_after(bucket,key)->Result<ScanSplitPartition>split.create_scanner(config,&scan_options)->Result<ScanSplitScanner>// choose non-default family here via ScanOptionsforrowinscanner{let(bucket,key,columns)=row?;}
cobble-data-structure (Structured Wrappers)
Types
Type
Description
StructuredSingleDb
Structured SingleDb wrapper
StructuredDb
Structured Db wrapper
StructuredReadOnlyDb
Structured ReadOnlyDb wrapper
StructuredReader
Structured Reader wrapper
StructuredScanPlan
Structured scan plan
StructuredScanSplit
Structured scan split with optional resume/end boundary metadata
Structured values are represented with StructuredColumnValue and configured by StructuredSchema (Bytes / List column types).
StructuredSchema is also family-aware: column_families() returns per-family typed columns keyed by family name and always includes default, while StructuredSchemaBuilder methods accept Option<String> family arguments. Structured wrappers use StructuredWriteOptions / StructuredReadOptions / StructuredScanOptions for family selection.
StructuredDb also mirrors the new bounds-scan entrypoints: scan_bounds(...) and scan_with_options_bounds(...) use the same inclusive-start / exclusive-end semantics as raw Db.
cobble-web-monitor
Types
Type
Description
MonitorConfig
Web monitor configuration
MonitorServer
HTTP server for monitoring dashboard
MonitorServerHandle
Handle to control the running server
cobble-java
The Java API mirrors the Rust API. See Java Bindings for usage details. On the Java side, restore flows are exposed as Db.restore(..., boolean newDbId) and Db.restoreWithManifest(...).