domain capa

domain-recordings

Durable model for recorded video: segments and gaps as a tamper-evident per-camera hash chain, per-copy storage lifecycle with a unified deletion manifest, incident-scoped evidence holds, and immutable retention policy versions. The camera record itself lives in operations-camera-registry; this crate owns what was recorded.

Durable model for recorded video: segments and gaps as a tamper-evident per-camera hash chain, per-copy storage lifecycle with a unified deletion manifest, incident-scoped evidence holds, and immutable retention policy versions. The camera record itself lives in operations-camera-registry; this crate owns what was recorded.

Tierdomain
Roleunclassified (baselined)
Pathcrates/domain/recordings
Edition2021
Targetsdomain_recordings, schema_integration
Public items117 across 8 modules
Tests54

What it is for

domain-recordings — the durable model for recorded video.

What was recorded, where its copies live, what pins it, and how long it survives. The camera record itself belongs to operations-camera-registry; this crate never restates camera configuration, only references it.

# Shape

Pure and DB-free by default; persistence lands behind the postgres feature, mirroring operations-camera-registry. That keeps the model testable without a database and keeps sqlx out of consumers that only need the types.

# The decisions this crate encodes

Built from forge-nvr's ADR-0008 through ADR-0011, which reached unanimous three-AI consensus across nine review rounds. The governing ones:

concatenation is cryptographically ambiguous, and the API makes it unreachable rather than merely discouraged.

an outside party can verify with tooling they already trust.

never claim a segment is gone while bytes survive on some tier.

# What this crate deliberately does not do

It plans; it never executes. There is no worker, no scheduler, and no code path that deletes a file. A library that erases customer footage the moment it is imported is a library that erases customer footage by accident; activation, scheduling, batch limits and the kill switch belong to the consuming application (ADR-0008 D6).

Capabilities

chain (other)

The per-camera tamper-evidence chain (ADR-0011 D3).

Item
fn verify(from : ChainValue, links : & ChainLink) -> Result <ChainValue, ChainError>

ChainError

The per-camera tamper-evidence chain (ADR-0011 D3).

Item
pub enum ChainError

ChainInput

The per-camera tamper-evidence chain (ADR-0011 D3).

Item
pub struct ChainInput
ChainInput :: fn new(seq : ChainSeq, prev : ChainValue, entry_type : EntryType, artifact_id : ArtifactId, payload_digest : PayloadDigest, camera : CameraRef, started_at : DateTime <Utc>, ended_at : DateTime <Utc>,) -> Self
ChainInput :: fn with_storage_copy(mut self, id : impl Into <String>) -> Self
ChainInput :: fn with_policy_decision(mut self, decision : impl Into <String>) -> Self
ChainInput :: const fn seq(& self) -> ChainSeq
ChainInput :: const fn entry_type(& self) -> EntryType
ChainInput :: fn compute(& self) -> ChainValue

ChainLink

The per-camera tamper-evidence chain (ADR-0011 D3).

Item
pub struct ChainLink

ChainValue

The per-camera tamper-evidence chain (ADR-0011 D3).

Item
pub struct ChainValue
ChainValue :: fn genesis() -> Self
ChainValue :: const fn as_bytes(& self) -> & u8; 32
ChainValue :: const fn from_stored_bytes(bytes : u8; 32) -> Self
ChainValue :: fn to_hex(& self) -> String

EntryType

The per-camera tamper-evidence chain (ADR-0011 D3).

Item
pub enum EntryType

CopyState

Per-copy storage lifecycle and the unified deletion manifest.

Item
pub enum CopyState
CopyState :: const fn may_hold_bytes(self) -> bool
CopyState :: const fn is_verified(self) -> bool

DeletionManifest

Per-copy storage lifecycle and the unified deletion manifest.

Item
pub struct DeletionManifest
DeletionManifest :: fn new() -> Self
DeletionManifest :: fn record(& mut self, event : ManifestEvent)
DeletionManifest :: fn events(& self) -> & ManifestEvent
DeletionManifest :: fn has_unverifiable_copy(& self) -> bool

DestinationId

Per-copy storage lifecycle and the unified deletion manifest.

Item
pub struct DestinationId
DestinationId :: fn new(id : impl Into <String>) -> Self
DestinationId :: fn as_str(& self) -> & str
DestinationId :: fn fmt(& self, f : & mut fmt::Formatter <'_>) -> fmt::Result

ManifestEvent

Per-copy storage lifecycle and the unified deletion manifest.

Item
pub struct ManifestEvent

SegmentPresence

Per-copy storage lifecycle and the unified deletion manifest.

Item
pub enum SegmentPresence
SegmentPresence :: fn derive(copies : & StorageCopy) -> Self
SegmentPresence :: const fn audit_phrase(self) -> & 'static str

StorageCopy

Per-copy storage lifecycle and the unified deletion manifest.

Item
pub struct StorageCopy
StorageCopy :: const fn is_safe_to_reclaim_source(& self) -> bool

Tier

Per-copy storage lifecycle and the unified deletion manifest.

Item
pub enum Tier

DigestWriter

Payload digests (ADR-0011 D1).

Item
pub struct DigestWriter
DigestWriter :: fn new() -> Self
DigestWriter :: fn update(& mut self, chunk : & u8)
DigestWriter :: fn finalize(self) -> PayloadDigest

PayloadDigest

Payload digests (ADR-0011 D1).

Item
pub struct PayloadDigest
PayloadDigest :: const fn blake3(& self) -> & u8; 32
PayloadDigest :: const fn sha256(& self) -> & u8; 32
PayloadDigest :: const fn from_stored(blake3 : u8; 32, sha256 : u8; 32) -> Self
PayloadDigest :: fn blake3_hex(& self) -> String
PayloadDigest :: fn sha256_hex(& self) -> String

Hold

Evidence holds — the one thing that outranks every retention rule.

Item
pub struct Hold
Hold :: fn place(incident : IncidentId, cameras : Vec <CameraRef>, windows : Vec <HoldWindow>, reason : impl Into <String>, expires_at : Option <DateTime <Utc>>, placed_at : DateTime <Utc>, placed_by : impl Into <String>,) -> Result <Self, HoldError>
Hold :: fn extend_until(& mut self, new_expiry : DateTime <Utc>) -> Result <(), HoldError>
Hold :: fn pins(& self, camera : & CameraRef, start : DateTime <Utc>, end : DateTime <Utc>, now : DateTime <Utc>,) -> bool
Hold :: const fn incident(& self) -> & IncidentId
Hold :: fn reason(& self) -> & str
Hold :: const fn expires_at(& self) -> DateTime <Utc>
Hold :: const fn placed_at(& self) -> DateTime <Utc>
Hold :: fn placed_by(& self) -> & str
Hold :: fn cameras(& self) -> & CameraRef
Hold :: fn windows(& self) -> & HoldWindow

HoldError

Evidence holds — the one thing that outranks every retention rule.

Item
pub enum HoldError

HoldWindow

Evidence holds — the one thing that outranks every retention rule.

Item
pub struct HoldWindow
HoldWindow :: fn covers(& self, at : DateTime <Utc>) -> bool
HoldWindow :: fn overlaps(& self, start : DateTime <Utc>, end : DateTime <Utc>) -> bool

IncidentId

Evidence holds — the one thing that outranks every retention rule.

Item
pub struct IncidentId
IncidentId :: fn new(id : impl Into <String>) -> Self
IncidentId :: fn as_str(& self) -> & str
IncidentId :: fn fmt(& self, f : & mut fmt::Formatter <'_>) -> fmt::Result

ArtifactId

Newtypes for the durable model.

Item
pub struct ArtifactId
ArtifactId :: fn new(id : impl Into <String>) -> Self
ArtifactId :: fn as_str(& self) -> & str
ArtifactId :: fn fmt(& self, f : & mut fmt::Formatter <'_>) -> fmt::Result

CameraRef

Newtypes for the durable model.

Item
pub struct CameraRef
CameraRef :: fn new(id : impl Into <String>) -> Self
CameraRef :: fn as_str(& self) -> & str
CameraRef :: fn fmt(& self, f : & mut fmt::Formatter <'_>) -> fmt::Result

ChainSeq

Newtypes for the durable model.

Item
pub struct ChainSeq
ChainSeq :: const fn new(n : u64) -> Self
ChainSeq :: const fn get(self) -> u64
ChainSeq :: const fn next(self) -> Self
ChainSeq :: fn fmt(& self, f : & mut fmt::Formatter <'_>) -> fmt::Result

DeletionPriority

Retention decisions and the immutable policy versions that produced them.

Item
pub enum DeletionPriority

PolicyVersion

Retention decisions and the immutable policy versions that produced them.

Item
pub struct PolicyVersion
PolicyVersion :: const fn new(n : u32) -> Self
PolicyVersion :: const fn get(self) -> u32
PolicyVersion :: const fn next(self) -> Self
PolicyVersion :: fn fmt(& self, f : & mut fmt::Formatter <'_>) -> fmt::Result

RetentionClass

Retention decisions and the immutable policy versions that produced them.

Item
pub struct RetentionClass
RetentionClass :: fn new(name : impl Into <String>) -> Self
RetentionClass :: fn as_str(& self) -> & str
RetentionClass :: fn fmt(& self, f : & mut fmt::Formatter <'_>) -> fmt::Result

RetentionDecision

Retention decisions and the immutable policy versions that produced them.

Item
pub struct RetentionDecision
RetentionDecision :: fn new(class : RetentionClass, protected_until : DateTime <Utc>, priority : DeletionPriority, decided_by : PolicyVersion, decided_at : DateTime <Utc>,) -> Self
RetentionDecision :: fn extend(& mut self, until : DateTime <Utc>, by : PolicyVersion, at : DateTime <Utc>,) -> Result <(), RetentionNotExtended>
RetentionDecision :: fn is_past_protection(& self, now : DateTime <Utc>) -> bool
RetentionDecision :: const fn protected_until(& self) -> DateTime <Utc>
RetentionDecision :: const fn priority(& self) -> DeletionPriority
RetentionDecision :: const fn decided_by(& self) -> PolicyVersion
RetentionDecision :: const fn decided_at(& self) -> DateTime <Utc>
RetentionDecision :: const fn class(& self) -> & RetentionClass

RetentionNotExtended

Retention decisions and the immutable policy versions that produced them.

Item
pub struct RetentionNotExtended

BackfillState

Segments and gaps — what the recorder produced, and what it didn't.

Item
pub enum BackfillState

Classification

Segments and gaps — what the recorder produced, and what it didn't.

Item
pub enum Classification
Classification :: const fn is_erasable(self) -> bool

Gap

Segments and gaps — what the recorder produced, and what it didn't.

Item
pub struct Gap
Gap :: fn duration(& self) -> Duration
Gap :: const fn has_full_custody_weight(& self) -> bool

GapCause

Segments and gaps — what the recorder produced, and what it didn't.

Item
pub enum GapCause

Segment

Segments and gaps — what the recorder produced, and what it didn't.

Item
pub struct Segment
Segment :: fn duration(& self) -> Duration
Segment :: fn covers(& self, at : DateTime <Utc>) -> bool

StreamKind

Segments and gaps — what the recorder produced, and what it didn't.

Item
pub enum StreamKind

store (other)

Postgres persistence, behind the postgres feature.

Item
const fn entry_type_column(t : EntryType) -> & 'static str

StoreError

Postgres persistence, behind the postgres feature.

Item
pub enum StoreError
StoreError :: fn is_duplicate_chain_position(& self) -> bool
StoreError :: fn is_invariant_violation(& self) -> bool
async fn ensure_schema(pool : & PgPool) -> Result <(), StoreError>
async fn chain_head(pool : & PgPool, camera : & CameraRef,) -> Result <Option <(ChainSeq, ChainValue)>, StoreError>
async fn copies_of(pool : & PgPool, artifact : & ArtifactId,) -> Result <Vec <StorageCopy>, StoreError>
async fn presence_of(pool : & PgPool, artifact : & ArtifactId,) -> Result <SegmentPresence, StoreError>
async fn is_held(pool : & PgPool, camera : & CameraRef, start : DateTime <Utc>, end : DateTime <Utc>, now : DateTime <Utc>,) -> Result <bool, StoreError>

How to use it

No examples/ target and no doctest in this crate's rustdoc. The tests listed under Verification are the closest executable usage.

Module structure

domain_recordings

flowchart TD
  n_domain_recordings["domain_recordings"]
  n_domain_recordings --> n_chain["chain"]
  n_domain_recordings --> n_copy["copy"]
  n_domain_recordings --> n_digest["digest"]
  n_domain_recordings --> n_hold["hold"]
  n_domain_recordings --> n_ids["ids"]
  n_domain_recordings --> n_policy["policy"]
  n_domain_recordings --> n_segment["segment"]
  n_domain_recordings --> n_store["store"]

Public surface

`chain`

ItemWhat it is
pub enum EntryType
pub struct ChainValueA chain value: the BLAKE3 output binding this entry to every entry before it.
ChainValue :: fn genesis() -> SelfThe chain value that precedes the first entry for a camera
ChainValue :: const fn as_bytes(& self) -> & u8; 32
ChainValue :: const fn from_stored_bytes(bytes : u8; 32) -> SelfReconstruct a value read back from storage
ChainValue :: fn to_hex(& self) -> String
pub struct ChainInputThe inputs to one chain position
ChainInput :: fn new(seq : ChainSeq, prev : ChainValue, entry_type : EntryType, artifact_id : ArtifactId, payload_digest : PayloadDigest, camera : CameraRef, started_at : DateTime <Utc>, ended_at : DateTime <Utc>,) -> SelfThe only way to build a chain input.
ChainInput :: fn with_storage_copy(mut self, id : impl Into <String>) -> SelfBind this entry to the storage copy it describes.
ChainInput :: fn with_policy_decision(mut self, decision : impl Into <String>) -> SelfBind this entry to the retention decision that produced it.
ChainInput :: const fn seq(& self) -> ChainSeq
ChainInput :: const fn entry_type(& self) -> EntryType
ChainInput :: fn compute(& self) -> ChainValueCompute this entry's chain value
pub enum ChainErrorWhy a chain failed to verify.
pub struct ChainLinkOne verified link: what was stored, alongside the inputs it claims to cover.
fn verify(from : ChainValue, links : & ChainLink) -> Result <ChainValue, ChainError>Verify a camera's chain from genesis (or a trusted anchor) forward

`copy`

ItemWhat it is
pub enum TierWhere a copy lives (ADR-0009 D2).
pub struct DestinationIdA configured storage destination.
DestinationId :: fn new(id : impl Into <String>) -> Self
DestinationId :: fn as_str(& self) -> & str
DestinationId :: fn fmt(& self, f : & mut fmt::Formatter <'_>) -> fmt::Result
pub enum CopyStateThe state of one copy at one destination
CopyState :: const fn may_hold_bytes(self) -> boolWhether this copy is known to still hold readable bytes.
CopyState :: const fn is_verified(self) -> boolWhether this state was reached by verification rather than by assumption.
pub struct StorageCopyOne copy of one artifact at one destination.
StorageCopy :: const fn is_safe_to_reclaim_source(& self) -> boolWhether hot space backed by this copy may be reclaimed.
pub enum SegmentPresenceWhat can honestly be said about an artifact, derived from all its copies.
SegmentPresence :: fn derive(copies : & StorageCopy) -> SelfDerive presence from copies
SegmentPresence :: const fn audit_phrase(self) -> & 'static strWording for an audit record or the integrity screen.
pub struct ManifestEventOne immutable entry in an artifact's deletion manifest
pub struct DeletionManifestThe append-only manifest for one artifact.
DeletionManifest :: fn new() -> Self
DeletionManifest :: fn record(& mut self, event : ManifestEvent)Append an event
DeletionManifest :: fn events(& self) -> & ManifestEvent
DeletionManifest :: fn has_unverifiable_copy(& self) -> boolWhether any copy was merely declared lost rather than verified

`digest`

ItemWhat it is
pub struct PayloadDigestBoth digests of one artifact's bytes.
PayloadDigest :: const fn blake3(& self) -> & u8; 32
PayloadDigest :: const fn sha256(& self) -> & u8; 32
PayloadDigest :: const fn from_stored(blake3 : u8; 32, sha256 : u8; 32) -> SelfReconstruct a digest read back from storage
PayloadDigest :: fn blake3_hex(& self) -> String
PayloadDigest :: fn sha256_hex(& self) -> String
pub struct DigestWriterComputes both digests in a single pass over the bytes
DigestWriter :: fn new() -> Self
DigestWriter :: fn update(& mut self, chunk : & u8)Feed the next chunk
DigestWriter :: fn finalize(self) -> PayloadDigest

`hold`

ItemWhat it is
pub struct IncidentIdThe incident a hold belongs to
IncidentId :: fn new(id : impl Into <String>) -> Self
IncidentId :: fn as_str(& self) -> & str
IncidentId :: fn fmt(& self, f : & mut fmt::Formatter <'_>) -> fmt::Result
pub struct HoldWindowA time window a hold covers.
HoldWindow :: fn covers(& self, at : DateTime <Utc>) -> bool
HoldWindow :: fn overlaps(& self, start : DateTime <Utc>, end : DateTime <Utc>) -> boolWhether this window overlaps a segment's span at all
pub enum HoldErrorWhy a hold could not be created.
pub struct HoldAn evidence hold.
Hold :: fn place(incident : IncidentId, cameras : Vec <CameraRef>, windows : Vec <HoldWindow>, reason : impl Into <String>, expires_at : Option <DateTime <Utc>>, placed_at : DateTime <Utc>, placed_by : impl Into <String>,) -> Result <Self, HoldError>Create a hold
Hold :: fn extend_until(& mut self, new_expiry : DateTime <Utc>) -> Result <(), HoldError>Push the expiry further out
Hold :: fn pins(& self, camera : & CameraRef, start : DateTime <Utc>, end : DateTime <Utc>, now : DateTime <Utc>,) -> boolWhether this hold pins a segment on camera spanning start..end.
Hold :: const fn incident(& self) -> & IncidentId
Hold :: fn reason(& self) -> & str
Hold :: const fn expires_at(& self) -> DateTime <Utc>
Hold :: const fn placed_at(& self) -> DateTime <Utc>
Hold :: fn placed_by(& self) -> & str
Hold :: fn cameras(& self) -> & CameraRef
Hold :: fn windows(& self) -> & HoldWindow

`ids`

ItemWhat it is
pub struct ChainSeqPosition of an entry within its camera's chain
ChainSeq :: const fn new(n : u64) -> Self
ChainSeq :: const fn get(self) -> u64
ChainSeq :: const fn next(self) -> SelfThe position after this one
ChainSeq :: fn fmt(& self, f : & mut fmt::Formatter <'_>) -> fmt::Result
pub struct ArtifactIdIdentifier of the thing a chain entry describes — a segment, a gap, or a derivative.
ArtifactId :: fn new(id : impl Into <String>) -> Self
ArtifactId :: fn as_str(& self) -> & str
ArtifactId :: fn fmt(& self, f : & mut fmt::Formatter <'_>) -> fmt::Result
pub struct CameraRefReference to the camera an entry belongs to
CameraRef :: fn new(id : impl Into <String>) -> Self
CameraRef :: fn as_str(& self) -> & str
CameraRef :: fn fmt(& self, f : & mut fmt::Formatter <'_>) -> fmt::Result

`policy`

ItemWhat it is
pub struct PolicyVersionAn immutable policy version
PolicyVersion :: const fn new(n : u32) -> Self
PolicyVersion :: const fn get(self) -> u32
PolicyVersion :: const fn next(self) -> Self
PolicyVersion :: fn fmt(& self, f : & mut fmt::Formatter <'_>) -> fmt::Result
pub enum DeletionPriorityHow aggressively a segment should be reclaimed once it is eligible
pub struct RetentionClassWhy a segment is being kept, in the operator's terms.
RetentionClass :: fn new(name : impl Into <String>) -> Self
RetentionClass :: fn as_str(& self) -> & str
RetentionClass :: fn fmt(& self, f : & mut fmt::Formatter <'_>) -> fmt::Result
pub struct RetentionNotExtendedAttempted to shorten a retention.
pub struct RetentionDecisionThe decision for one segment, and the evidence for it.
RetentionDecision :: fn new(class : RetentionClass, protected_until : DateTime <Utc>, priority : DeletionPriority, decided_by : PolicyVersion, decided_at : DateTime <Utc>,) -> Self
RetentionDecision :: fn extend(& mut self, until : DateTime <Utc>, by : PolicyVersion, at : DateTime <Utc>,) -> Result <(), RetentionNotExtended>Extend protection
RetentionDecision :: fn is_past_protection(& self, now : DateTime <Utc>) -> boolWhether the segment may be considered for erasure at now
RetentionDecision :: const fn protected_until(& self) -> DateTime <Utc>
RetentionDecision :: const fn priority(& self) -> DeletionPriority
RetentionDecision :: const fn decided_by(& self) -> PolicyVersion
RetentionDecision :: const fn decided_at(& self) -> DateTime <Utc>
RetentionDecision :: const fn class(& self) -> & RetentionClass

`segment`

ItemWhat it is
pub enum StreamKindWhich stream a segment came from (ADR-0010 D2)
pub enum ClassificationHow far detection has got with a segment (ADR-0009 D5).
Classification :: const fn is_erasable(self) -> boolWhether a segment in this state may ever be considered for erasure
pub struct SegmentA recorded segment.
Segment :: fn duration(& self) -> DurationWall-clock span this segment covers
Segment :: fn covers(& self, at : DateTime <Utc>) -> boolWhether this segment covers at.
pub enum GapCauseWhy there is no footage for a span.
pub enum BackfillStateWhether a gap can still be filled.
pub struct GapA span with no footage
Gap :: fn duration(& self) -> Duration
Gap :: const fn has_full_custody_weight(& self) -> boolWhether footage recovered for this gap should be treated as having the same evidentiary weight as directly-recorded footage

`store`

ItemWhat it is
pub enum StoreErrorPersistence errors.
StoreError :: fn is_duplicate_chain_position(& self) -> boolDoes this error mean the chain position was already taken? The (camera_ref, seq) unique index is what enforces monotonicity at the database level, so the violation arrives as a Postgres 23505
StoreError :: fn is_invariant_violation(& self) -> boolDoes this error mean an append-only or monotonicity guard refused the write? These are deliberate RAISE EXCEPTIONs from the migration triggers — editing the deletion manifest, shortening a hold, shortening retention, or mutating a policy version
async fn ensure_schema(pool : & PgPool) -> Result <(), StoreError>Apply the crate's migrations, in order, on every call
async fn chain_head(pool : & PgPool, camera : & CameraRef,) -> Result <Option <(ChainSeq, ChainValue)>, StoreError>The last chain value and sequence for a camera, or None if it has no entries yet
async fn copies_of(pool : & PgPool, artifact : & ArtifactId,) -> Result <Vec <StorageCopy>, StoreError>All copies of an artifact, across every destination
async fn presence_of(pool : & PgPool, artifact : & ArtifactId,) -> Result <SegmentPresence, StoreError>What can honestly be said about an artifact right now
async fn is_held(pool : & PgPool, camera : & CameraRef, start : DateTime <Utc>, end : DateTime <Utc>, now : DateTime <Utc>,) -> Result <bool, StoreError>Whether any active hold pins a segment on camera spanning start..end
const fn entry_type_column(t : EntryType) -> & 'static strColumn value for an entry type.

Re-exports. Exported here, defined elsewhere.

ExportDefined in
{ArtifactId,CameraRef,ChainSeq}ids::{ArtifactId,CameraRef,ChainSeq}
{BackfillState,Classification,Gap,GapCause,Segment,StreamKind}segment::{BackfillState,Classification,Gap,GapCause,Segment,StreamKind}
{ChainError,ChainInput,ChainLink,ChainValue,EntryType}chain::{ChainError,ChainInput,ChainLink,ChainValue,EntryType}
{CopyState,DeletionManifest,DestinationId,ManifestEvent,SegmentPresence,StorageCopy,Tier,}copy::{CopyState,DeletionManifest,DestinationId,ManifestEvent,SegmentPresence,StorageCopy,Tier,}
{DeletionPriority,PolicyVersion,RetentionClass,RetentionDecision,RetentionNotExtended,}policy::{DeletionPriority,PolicyVersion,RetentionClass,RetentionDecision,RetentionNotExtended,}
{DigestWriter,PayloadDigest}digest::{DigestWriter,PayloadDigest}
{Hold,HoldError,HoldWindow,IncidentId}hold::{Hold,HoldError,HoldWindow,IncidentId}
{ensure_schema,StoreError}store::{ensure_schema,StoreError}

Boundary

Reaches into operations.

Shares tier domain with 41 other crates: domain-agreements, domain-ai-report, domain-billing, domain-catalog, domain-classify, domain-comments, domain-competitive-intel, domain-contact, … (41 total).

_What this crate deliberately does NOT own is a judgment. No committed registry records one for it, so none is stated here._

Where it sits

Tier (ontology)domain
Architectural role (taxonomy)unclassified (baselined)
Locationcrates/domain/recordings
Vocabulary in force (lexicon)current

Tier flow. Which tiers this crate's own edges cross.

flowchart LR
  n_domain["domain"] --> n_operations["operations"]

Dependencies

Runtime, in this workspace.

CrateTierOptionalOnly on
`operations-camera-discovery`operationsnoalways

Runtime, from outside the workspace.

CrateRequirementFeaturesOptionalOnly on
blake3^1noalways
chrono^0.4serdenoalways
serde^1derivenoalways
sha2^0.10noalways
sqlx^0.8runtime-tokio, postgres, chrono, uuid, jsonyesalways
thiserror^2noalways
uuid^1v4, v7, serde, jsnoalways

Development, from outside the workspace.

CrateRequirementFeaturesOptionalOnly on
sqlx^0.8runtime-tokio, postgres, chrono, uuid, jsonnoalways
tokio^1full, macros, rt-multi-threadnoalways

Build. None.

Depended on by. Nothing in this workspace.

Signal flow — what reaches this crate, and what it reaches.

flowchart LR
  SELF["domain-recordings"]
  SELF -->|runtime| n_operations_camera_discovery["operations-camera-discovery"]
  classDef self fill:#1f883d,stroke:#1f883d,color:#fff;
  class SELF self;

Feature flags

FeatureEnablesOn by default
defaultyes
postgresdep:sqlxno
flowchart LR
  n_default["default"]
  n_postgres["postgres"] --> n_dep_sqlx["dep:sqlx"]

Targets

KindNameSource
libdomain_recordings`src/lib.rs`
testschema_integration`tests/schema_integration.rs`

Error model

Error typeNamed by
ChainErrorverify
HoldErrordeclared, no public signature returns it
StoreErrorchain_head, copies_of, ensure_schema, is_held, presence_of

Operational characteristics

PropertyEvidence
async public surfaceyes
async runtimenone detected
database accessyes
network I/Onone detected
unsafe codenone detected
environment variablesnone detected

No unsafe block, unsafe fn, unsafe impl or unsafe trait was found by the parser anywhere in this crate's source.

Configuration

No environment variable is read with a literal name anywhere in this crate. A variable whose key is computed at run time cannot be listed here, and is not claimed to be absent.

No workspace crate depends on this one.

Verification

KindCount
Unit tests43
Integration tests11
Examples0
Doctests0

Evidence by module. How often each public module is named by something executable.

ModuleTestsExamplesConsumers
chain600
copy700
digest200
hold400
ids300
policy500
segment600
store700

What the tests establish, by name:

Documentation coverage

MeasureDocumentedTotal
Public items with rustdoc67117
Public modules with a //! block88
pie showData
    title Public items with rustdoc
    "Documented" : 67
    "No rustdoc detected" : 50

Metrics

MetricValue
Rust source files9
Source lines2206
Code lines1533
Public API items117
Public modules8
Tests54
Examples0
Cargo features2
Direct runtime dependencies8
Workspace reverse dependencies0
pie showData
    title Public API by kind
    "enum" : 12
    "function" : 7
    "method" : 77
    "struct" : 21
pie showData
    title Rust source composition
    "Code" : 1533
    "Blank or comment" : 673

Generation

Rendered by tools-corpus corpus readme from repository evidence alone, renderer schema 2, lexicon current. No model, network service or database was consulted. Regenerate with tools-corpus corpus readme --write; verify with --check.

Todas las domain · Manual