pub struct RedactionService { /* private fields */ }Expand description
Redaction service coordinating strategy execution.
This service provides a high-level API for redacting documents using different strategies while handling common concerns like progress reporting and error handling.
Implementations§
Source§impl RedactionService
impl RedactionService
Sourcepub fn new(strategy: Box<dyn RedactionStrategy>) -> Self
pub fn new(strategy: Box<dyn RedactionStrategy>) -> Self
Creates a new redaction service with the specified strategy.
Sourcepub fn with_secure_strategy() -> Self
pub fn with_secure_strategy() -> Self
Creates a service with secure (physical removal) redaction.
Sourcepub fn redact(
&self,
input: &Path,
output: &Path,
targets: &[RedactionTarget],
) -> RedactorResult<RedactionResult>
pub fn redact( &self, input: &Path, output: &Path, targets: &[RedactionTarget], ) -> RedactorResult<RedactionResult>
Sourcepub fn extract_text(&self, input: &Path) -> RedactorResult<String>
pub fn extract_text(&self, input: &Path) -> RedactorResult<String>
Extracts text from a PDF for analysis.
Auto Trait Implementations§
impl Freeze for RedactionService
impl !RefUnwindSafe for RedactionService
impl Send for RedactionService
impl Sync for RedactionService
impl Unpin for RedactionService
impl !UnwindSafe for RedactionService
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more