NarCalculationService

Trait 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.

Implementations on Foreign Types§

Source§

impl<'a, T: 'a + NarCalculationService + ?Sized> NarCalculationService for &'a T
where &'a T: Send + Sync,

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,

Source§

impl<'a, T: 'a + NarCalculationService + ?Sized> NarCalculationService for &'a mut T
where &'a mut T: Send + Sync,

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,

Source§

impl<T: NarCalculationService + ?Sized> NarCalculationService for Box<T>
where Box<T>: Send + Sync,

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,

Source§

impl<T: NarCalculationService + ?Sized> NarCalculationService for Arc<T>
where Arc<T>: Send + Sync,

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,

Implementors§

Source§

impl<BS, DS> NarCalculationService for SimpleRenderer<BS, DS>

Source§

impl<T> NarCalculationService for GRPCPathInfoService<T>
where T: GrpcService<Body> + Send + Sync + Clone + 'static, T::ResponseBody: Body<Data = Bytes> + Send + 'static, <T::ResponseBody as Body>::Error: Into<StdError> + Send, T::Future: Send,