Trait tvix_store::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>>> + Send + 'async_trait>>
where 'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: '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§
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>>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
Trait Implementations§
source§impl<T, S> From<S> for Box<dyn ServiceBuilder<Output = T>>where
S: ServiceBuilder<Output = T> + 'static,
T: ?Sized,
impl<T, S> From<S> for Box<dyn ServiceBuilder<Output = T>>where
S: ServiceBuilder<Output = T> + 'static,
T: ?Sized,
source§fn from(t: S) -> Box<dyn ServiceBuilder<Output = T>>
fn from(t: S) -> Box<dyn ServiceBuilder<Output = T>>
Converts to this type from the input type.