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§
Sourcefn new(file_bytes: Vec<u8>) -> Result<Self, ScrubError>where
Self: Sized,
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.
Sourcefn view_metadata(&self) -> Result<Vec<MetadataEntry>, ScrubError>
fn view_metadata(&self) -> Result<Vec<MetadataEntry>, ScrubError>
Returns all found metadata in a structured format.
Sourcefn scrub(&self) -> Result<ScrubResult, ScrubError>
fn scrub(&self) -> Result<ScrubResult, ScrubError>
Removes all identifiable metadata.