pub struct Redactor { /* private fields */ }Expand description
Two-phase redactor: mark areas, then apply.
Implementations§
Source§impl Redactor
impl Redactor
Sourcepub fn mark(&mut self, area: RedactionArea)
pub fn mark(&mut self, area: RedactionArea)
Mark an area for redaction.
Sourcepub fn mark_all(&mut self, areas: impl IntoIterator<Item = RedactionArea>)
pub fn mark_all(&mut self, areas: impl IntoIterator<Item = RedactionArea>)
Mark multiple areas for redaction.
Sourcepub fn pending_count(&self) -> usize
pub fn pending_count(&self) -> usize
Return the number of pending redaction areas.
Sourcepub fn apply(&self, doc: &mut Document) -> Result<RedactionReport>
pub fn apply(&self, doc: &mut Document) -> Result<RedactionReport>
Apply all pending redactions to the document.
This permanently removes content in the marked areas, draws overlay rectangles, and cleans document metadata.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Redactor
impl RefUnwindSafe for Redactor
impl Send for Redactor
impl Sync for Redactor
impl Unpin for Redactor
impl UnsafeUnpin for Redactor
impl UnwindSafe for Redactor
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
Read this value from the supplied reader. Same as
ReadEndian::read_from_little_endian().