Skip to main content

cloudiful_redactor/
lib.rs

1mod detect;
2mod input;
3mod llm;
4mod redactor;
5mod replace;
6mod service;
7mod session;
8#[cfg(test)]
9mod tests;
10mod types;
11
12pub use input::InputKind;
13pub use llm::LlmConfig;
14pub use redactor::{Redactor, RedactorBuilder, SessionRedactor};
15pub use service::{
16    EncryptedRedactionArtifact, decrypt_redaction_session, redact_text_artifact,
17    redact_text_with_encrypted_session, restore_text_from_encrypted_session,
18};
19pub use session::{
20    decrypt_session_from_str, encrypt_session_to_string, ensure_restore_valid,
21    inspect_encrypted_session, restore_patch_with_session, restore_text_with_session,
22};
23use thiserror::Error;
24pub use types::{
25    AppliedReplacement, Finding, FindingKind, FindingSource, RedactionArtifact, RedactionResult,
26    RedactionRules, RedactionSession, RedactionStats, ReplacementStrategy, RestorationEntry,
27    RestoreResult, SessionEntrySummary, SessionSummary,
28};
29
30#[derive(Debug, Error)]
31pub enum RedactorError {
32    #[error("llm error: {0}")]
33    Llm(String),
34    #[error("validation error: {0}")]
35    Validation(String),
36}