_No description in Cargo.toml._
| Tier | infrastructure |
| Role | unclassified (baselined) |
| Path | crates/infrastructure/ocr |
| Edition | 2021 |
| Targets | infrastructure_ocr |
| Public items | 0 across 0 modules |
| Tests | 29 |
What it is for
# infrastructure-ocr
OCR result storage and retrieval for the rust-framework-workspace ecosystem.
Provides a domain model for storing OCR extraction results with:
- Polymorphic entity linkage (
entity_type+entity_id) - Optional asset/variant linkage
- Confidence scoring and human review workflow
- Soft delete support
Feature Flags
postgres— EnablesOcrServicewith async PostgreSQL persistence via sqlx.
Without this feature, only types, enums, and the builder are available.
Capabilities
No public items.
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
No public modules: the crate root is its whole surface.
Public surface
No public items.
Re-exports. Exported here, defined elsewhere.
| Export | Defined in |
|---|---|
OcrError | error::OcrError |
{ListHistoryParams,OcrService} | service::{ListHistoryParams,OcrService} |
{OcrResult,OcrResultBuilder} | model::{OcrResult,OcrResultBuilder} |
{OcrSourceType,OcrStatus} | enums::{OcrSourceType,OcrStatus} |
Boundary
Reaches into foundation.
Shares tier infrastructure with 82 other crates: infrastructure-acquire, infrastructure-adapters-google-calendar, infrastructure-adapters-google-gmail, infrastructure-adapters-google-places, infrastructure-adapters-google-trends, infrastructure-adapters-shodan, infrastructure-adapters-yelp, infrastructure-agent, … (82 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) | infrastructure |
| Architectural role (taxonomy) | unclassified (baselined) |
| Location | crates/infrastructure/ocr |
| Vocabulary in force (lexicon) | current |
Tier flow. Which tiers this crate's own edges cross.
flowchart LR n_infrastructure["infrastructure"] --> n_foundation["foundation"]
Dependencies
Runtime, in this workspace.
| Crate | Tier | Optional | Only on |
|---|---|---|---|
| `foundation-basemodels` | foundation | no | always |
Runtime, from outside the workspace.
| Crate | Requirement | Features | Optional | Only on |
|---|---|---|---|---|
chrono | ^0.4 | serde | no | always |
serde | ^1 | derive | no | always |
serde_json | ^1 | — | no | always |
sqlx | ^0.8 | runtime-tokio, postgres, chrono, uuid, json | yes | always |
thiserror | ^2 | — | no | always |
uuid | ^1 | v4, v7, serde, js | no | always |
Development, from outside the workspace.
| Crate | Requirement | Features | Optional | Only on |
|---|---|---|---|---|
tokio | ^1 | full, macros, rt-multi-thread | no | always |
Build. None.
Depended on by. 1 workspace crate.
Signal flow — what reaches this crate, and what it reaches.
flowchart LR n_application_ocr["application-ocr"] -->|uses| SELF SELF["infrastructure-ocr"] SELF -->|runtime| n_foundation_basemodels["foundation-basemodels"] classDef self fill:#1f883d,stroke:#1f883d,color:#fff; class SELF self;
Feature flags
| Feature | Enables | On by default |
|---|---|---|
default | — | yes |
postgres | dep:sqlx | no |
flowchart LR n_default["default"] n_postgres["postgres"] --> n_dep_sqlx["dep:sqlx"]
Targets
| Kind | Name | Source |
|---|---|---|
| lib | infrastructure_ocr | `src/lib.rs` |
Error model
No public error type was detected: no public item declares a type named *Error, and no public signature returns one.
Operational characteristics
| Property | Evidence |
|---|---|
| async public surface | none detected |
| async runtime | none detected |
| database access | yes |
| network I/O | none detected |
| unsafe code | none detected |
| environment variables | none 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.
Related capabilities
1 workspace crate depends on this one: application-ocr.
Verification
| Kind | Count |
|---|---|
| Unit tests | 29 |
| Integration tests | 0 |
| Examples | 0 |
| Doctests | 0 |
What the tests establish, by name:
test_source_type_display—src/enums.rstest_source_type_from_str_invalid—src/enums.rstest_source_type_from_str_roundtrip—src/enums.rstest_source_type_serde_roundtrip—src/enums.rstest_source_type_serde_snake_case—src/enums.rstest_status_display—src/enums.rstest_status_from_str_invalid—src/enums.rstest_status_from_str_roundtrip—src/enums.rstest_status_serde_roundtrip—src/enums.rstest_status_serde_snake_case—src/enums.rstest_not_found_display—src/error.rstest_validation_error_display—src/error.rstest_builder_full—src/model.rstest_builder_minimal_with_asset_id—src/model.rstest_builder_minimal_with_variant_id—src/model.rstest_builder_missing_both_asset_refs—src/model.rstest_builder_missing_entity_id—src/model.rstest_builder_missing_entity_type—src/model.rstest_builder_missing_source_type—src/model.rstest_builder_with_both_asset_refs—src/model.rstest_builder_with_error_message—src/model.rstest_builder_with_job_id—src/model.rstest_default_status_is_pending—src/model.rstest_has_id_trait—src/model.rstest_serde_roundtrip—src/model.rstest_soft_deletable_trait—src/model.rstest_timestamped_trait—src/model.rstest_list_history_params_builder—src/service.rstest_list_history_params_defaults—src/service.rs
Documentation coverage
| Measure | Documented | Total |
|---|---|---|
| Public items with rustdoc | 0 | 0 |
Public modules with a //! block | 0 | 0 |
Metrics
| Metric | Value |
|---|---|
| Rust source files | 5 |
| Source lines | 1118 |
| Code lines | 830 |
| Public API items | 0 |
| Public modules | 0 |
| Tests | 29 |
| Examples | 0 |
| Cargo features | 2 |
| Direct runtime dependencies | 7 |
| Workspace reverse dependencies | 1 |
pie showData
title Rust source composition
"Code" : 830
"Blank or comment" : 288
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.