Trait tvix_store::nar::NarCalculationService

source ·
pub trait NarCalculationService: Send + Sync {
    // Required method
    fn calculate_nar<'life0, 'life1, 'async_trait>(
        &'life0 self,
        root_node: &'life1 Node,
    ) -> Pin<Box<dyn Future<Output = Result<(u64, [u8; 32]), Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
}

Required Methods§

source

fn calculate_nar<'life0, 'life1, 'async_trait>( &'life0 self, root_node: &'life1 Node, ) -> Pin<Box<dyn Future<Output = Result<(u64, [u8; 32]), Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Return the nar size and nar sha256 digest for a given root node. This can be used to calculate NAR-based output paths.

Implementors§