Skip to main content

Scrubber

Trait Scrubber 

Source
pub trait Scrubber {
    // Required methods
    fn new(file_bytes: Vec<u8>) -> Result<Self, ScrubError>
       where Self: Sized;
    fn view_metadata(&self) -> Result<Vec<MetadataEntry>, ScrubError>;
    fn scrub(&self) -> Result<ScrubResult, ScrubError>;
}
Expand description

The central trait of our library. Any file type we want to support must implement this trait.

Required Methods§

Source

fn new(file_bytes: Vec<u8>) -> Result<Self, ScrubError>
where Self: Sized,

Creates a new Scrubber instance from file bytes. This will also parse the file to ensure it’s valid.

Source

fn view_metadata(&self) -> Result<Vec<MetadataEntry>, ScrubError>

Returns all found metadata in a structured format.

Source

fn scrub(&self) -> Result<ScrubResult, ScrubError>

Removes all identifiable metadata.

Implementors§