Trait tvix_castore::composition::ServiceBuilder

source ·
pub trait ServiceBuilder: Send + Sync {
    type Output: ?Sized;

    // Required method
    fn build<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        instance_name: &'life1 str,
        context: &'life2 CompositionContext<'_>,
    ) -> Pin<Box<dyn Future<Output = Result<Arc<Self::Output>, Box<dyn Error + Send + Sync + 'static>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
}
Expand description

This is the trait usually implemented on a per-store-type Config struct and used to instantiate it.

Required Associated Types§

Required Methods§

source

fn build<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, instance_name: &'life1 str, context: &'life2 CompositionContext<'_>, ) -> Pin<Box<dyn Future<Output = Result<Arc<Self::Output>, Box<dyn Error + Send + Sync + 'static>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Trait Implementations§

source§

impl<T: ?Sized, S: ServiceBuilder<Output = T> + 'static> From<S> for Box<dyn ServiceBuilder<Output = T>>

source§

fn from(t: S) -> Self

Converts to this type from the input type.

Implementors§