Struct tvix_castore::composition::Composition
source · pub struct Composition {
stores: Mutex<HashMap<(TypeId, String), Box<dyn Any + Send + Sync>>>,
}
Fields§
§stores: Mutex<HashMap<(TypeId, String), Box<dyn Any + Send + Sync>>>
Implementations§
source§impl Composition
impl Composition
pub fn extend_with_configs<T: ?Sized + Send + Sync + 'static>( &mut self, configs: HashMap<String, DeserializeWithRegistry<Box<dyn ServiceBuilder<Output = T>>>> )
pub async fn build<T: ?Sized + Send + Sync + 'static>( &self, entrypoint: &str ) -> Result<Arc<T>, CompositionError>
fn build_internal<T: ?Sized + Send + Sync + 'static>( &self, stack: Vec<(TypeId, String)>, entrypoint: String ) -> BoxFuture<'_, Result<Arc<T>, CompositionError>>
pub fn context(&self) -> CompositionContext<'_>
Trait Implementations§
source§impl Default for Composition
impl Default for Composition
source§fn default() -> Composition
fn default() -> Composition
Returns the “default value” for a type. Read more
source§impl<T: ?Sized + Send + Sync + 'static> Extend<(String, DeserializeWithRegistry<Box<dyn ServiceBuilder<Output = T>>>)> for Composition
impl<T: ?Sized + Send + Sync + 'static> Extend<(String, DeserializeWithRegistry<Box<dyn ServiceBuilder<Output = T>>>)> for Composition
source§fn extend<I>(&mut self, configs: I)where
I: IntoIterator<Item = (String, DeserializeWithRegistry<Box<dyn ServiceBuilder<Output = T>>>)>,
fn extend<I>(&mut self, configs: I)where
I: IntoIterator<Item = (String, DeserializeWithRegistry<Box<dyn ServiceBuilder<Output = T>>>)>,
Extends a collection with the contents of an iterator. Read more
source§fn extend_one(&mut self, item: A)
fn extend_one(&mut self, item: A)
🔬This is a nightly-only experimental API. (
extend_one
)Extends a collection with exactly one element.
source§fn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
🔬This is a nightly-only experimental API. (
extend_one
)Reserves capacity in a collection for the given number of additional elements. Read more
Auto Trait Implementations§
impl !Freeze for Composition
impl RefUnwindSafe for Composition
impl Send for Composition
impl Sync for Composition
impl Unpin for Composition
impl UnwindSafe for Composition
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> FutureExt for T
impl<T> FutureExt for T
source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
source§impl<T> FutureExt for T
impl<T> FutureExt for T
source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T
in a tonic::Request