Skip to main content

Crate chisel

Crate chisel 

Source

Structs§

Argon2Params
Argon2id cost parameters. Stored per-slot so a slot can be re-derived regardless of the binary’s current defaults.
Chisel
A live handle to an open Chisel database.
ChiselCounters
Cumulative engine-activity counters since open().
DefragOptions
Knobs for a defrag pass.
DefragStats
I36: #[non_exhaustive] for symmetry with DefragOptions and so a future bench-friendly stat (e.g. wall-time elapsed inside the sweep) is not a breaking change.
Handle
A stable, opaque chunk handle. Newtype over the engine’s u64 id.
Options
Open-time options. These are consumed once during Chisel::open and not retained on the live handle; changing them later requires reopening.
SlotDefect
A defect tagged with the candidate-slot index it was found at (I106).
Stats
Read-only summary of database size/usage. Populated by the transaction manager; no methods here because there are no invariants to enforce.
Tag
A non-zero chunk tag. “No tag” is the ABSENCE of a Tag (Option<Tag>) — Tag(0) is unconstructable, which makes the untagged sentinel expressible in the type (ISSUES.md I126). The engine still stores the tag as a u32 with 0 meaning untagged; the 0 <-> None mapping happens at the lib.rs boundary.
TagDropProgress
Progress report from Chisel::delete_with_tag. deleted lists the handles removed in this pass (the engine deletes their chunks); complete is true when the tag has no remaining members. Produced only on the success path — a mid-pass error returns Err and no progress (the per-delete state stays consistent; only the reporting is lost).

Enums§

ChiselError
I36 (ISSUES.md, 2026-05-22): #[non_exhaustive] so adding a new error variant (a future operational signal, a new fatal-corruption flavor) is not a breaking change. External match arms over ChiselError need a _ => … catchall; the conventional path is if e.is_fatal() { … } else { … } which never enumerates variants and is therefore unaffected. The Display impl below is exhaustive — adding a variant still requires updating its prose.
DrainInsertion
Where commit-drain rehydrated pages are inserted into the LRU.
Key
Client-supplied encryption credential. Raw is high-entropy key bytes (derived via HKDF); Passphrase is a human secret (derived via Argon2id). Both are zeroized on drop. Clone is needed because Options is consumed by open while rotation APIs may also hold a key.
SuperblockDefect
Why a superblock slot failed validation (I106). These are exactly the three torn-slot causes deserialize checks. Copy and small so the failure-path Vec<SlotDefect> is cheap.

Constants§

DEFAULT_SUPERBLOCK_COUNT
MAX_SUPERBLOCKS
MIN_SUPERBLOCKS
NAMED_ROOT_COUNT
NAMED_ROOT_NAME_LEN
PAGE_SIZE

Functions§

format_major
Extract the major-version byte pair from a packed format_version.

Type Aliases§

Result
Crate-wide Result alias. All fallible Chisel APIs return this.