pub fn clean(
input: &Path,
agent_out: AgentBundleDir,
owner_out: OwnerBundleDir,
) -> Result<SafeBundle, DocumentError>Available on crate feature
ocr-tesseract only.Expand description
Top-level entry point: ingest one document, write a SafeBundle to disk.
input must be a regular file with extension .png, .jpg, .jpeg, or
.pdf. agent_out and owner_out are created if missing and populated
with the split artifact layout described in the module docs.
§Errors
Returns DocumentError for any failure in the OCR → redact → write
chain. Fail-closed: every error variant carries enough context to
diagnose without inspecting partial bundle state.