ipmail 0.1.0

Rust implementation of SP-centric decentralized instant message synchronization protocol(DIMSP)
Documentation
use std::{io::Result, time::Duration};

use crate::{fs::IpldFS, percentage::Percentage};

/// Ipld object garbage conllection alogrithem
pub trait GcStrategy {
    type Executor: GcExectuor;

    /// Start a new GC process.
    fn start(&mut self) -> Self::Executor;
}

/// Gc executor.
pub trait GcExectuor {
    fn execute_once<FS: IpldFS>(
        &mut self,
        fs: &mut FS,
        max_execution_time: Duration,
    ) -> Result<Percentage>;
}