Trait HardlinkSubroutines

Source
pub trait HardlinkSubroutines<Size: Size>: DeduplicateSharedSize<Size> {
    // Required methods
    fn convert_error(error: Self::Error) -> RuntimeError;
    fn print_report(
        report: Self::Report,
        bytes_format: Size::DisplayFormat,
    ) -> Result<(), RuntimeError>;
    fn json_report(
        report: Self::Report,
    ) -> Result<Option<JsonShared<Size>>, RuntimeError>;
}
Expand description

Subroutines used by Sub to deduplicate sizes of detected hardlinks and report about it.

Required Methods§

Source

fn convert_error(error: Self::Error) -> RuntimeError

Convert the error to runtime error.

Source

fn print_report( report: Self::Report, bytes_format: Size::DisplayFormat, ) -> Result<(), RuntimeError>

Handle the report.

Source

fn json_report( report: Self::Report, ) -> Result<Option<JsonShared<Size>>, RuntimeError>

Create a JSON serializable object from the report.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<Size> HardlinkSubroutines<Size> for HardlinkAware<Size>
where DataTree<OsStringDisplay, Size>: Send, Size: Size + Sync,

Source§

impl<Size> HardlinkSubroutines<Size> for HardlinkIgnorant
where DataTree<OsStringDisplay, Size>: Send, Size: Size + Sync,