[−][src]Struct tari_service_framework::StackBuilder
Responsible for building and collecting handles and (usually long-running) service futures.
finish
is an async function which resolves once all the services are initialized, or returns
an error if any one of the services fails to initialize.
Methods
impl StackBuilder
[src]
pub fn new(executor: Handle, shutdown_signal: ShutdownSignal) -> Self
[src]
impl StackBuilder
[src]
pub fn add_initializer<I>(self, initializer: I) -> Self where
I: ServiceInitializer + Send + 'static,
I::Future: Send + 'static,
[src]
I: ServiceInitializer + Send + 'static,
I::Future: Send + 'static,
Add an impl of ServiceInitializer to the stack
pub fn add_initializer_boxed(self, initializer: BoxedServiceInitializer) -> Self
[src]
Add a ServiceInitializer which has been boxed using ServiceInitializer::boxed
pub async fn finish(
self
) -> Result<Arc<ServiceHandles>, ServiceInitializationError>
[src]
self
) -> Result<Arc<ServiceHandles>, ServiceInitializationError>
Concurrently initialize the services. Once all service have been initialized, notify_ready
is called, which completes initialization for those services. The resulting service handles are
returned. If ANY of the services fail to initialize, an error is returned.
Auto Trait Implementations
impl !RefUnwindSafe for StackBuilder
impl Send for StackBuilder
impl !Sync for StackBuilder
impl Unpin for StackBuilder
impl !UnwindSafe for StackBuilder
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,