Strategy

Trait Strategy 

Source
pub trait Strategy<O> {
    type E: Debug;

    // Required method
    fn skip(&self, output: &Path, args_hash: u64, code_hash: u64) -> bool;

    // Provided method
    fn callback(
        &self,
        _fn_output: &O,
        _output: &Path,
        _args_hash: u64,
        _code_hash: u64,
    ) -> Result<(), Self::E> { ... }
}

Required Associated Types§

Required Methods§

Source

fn skip(&self, output: &Path, args_hash: u64, code_hash: u64) -> bool

Should we skip generating the output? This can take into account the hash of the arguments and the code, provided as arguments.

Provided Methods§

Source

fn callback( &self, _fn_output: &O, _output: &Path, _args_hash: u64, _code_hash: u64, ) -> Result<(), Self::E>

When the output is not skipped, this is called after processing, right before returning.

Implementors§

Source§

impl<O> Strategy<O> for FileExists

Source§

type E = ()

Source§

impl<T, E> Strategy<Result<T, E>> for Markers<E>