pub struct SubMain<'m> { /* private fields */ }Expand description
A sub-main instance, which can be used to contribute global tasks to the main instance which
created this sub instance, but gather own tasks, which can be run independently by calling
the SubMain::run function.
Implementations§
Source§impl SubMain<'_>
impl SubMain<'_>
Sourcepub fn sub_main_seed(&self) -> SubMainSeed
pub fn sub_main_seed(&self) -> SubMainSeed
Create a seed or a sub-main instance, which can be sent.
Trait Implementations§
Source§impl<'m> Extend<Pin<Box<dyn Future<Output = Result<(), Error>> + 'm>>> for SubMain<'m>
impl<'m> Extend<Pin<Box<dyn Future<Output = Result<(), Error>> + 'm>>> for SubMain<'m>
Source§fn extend<T: IntoIterator<Item = LocalBoxFuture<'m, Result<()>>>>(
&mut self,
iter: T,
)
fn extend<T: IntoIterator<Item = LocalBoxFuture<'m, Result<()>>>>( &mut self, iter: 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
Source§impl From<SubMainSeed> for SubMain<'_>
impl From<SubMainSeed> for SubMain<'_>
Source§fn from(seed: SubMainSeed) -> Self
fn from(seed: SubMainSeed) -> Self
Converts to this type from the input type.
Source§impl<'m> Startup for SubMain<'m>
impl<'m> Startup for SubMain<'m>
Source§fn check_boxed(&mut self, check: Box<dyn HealthChecked>)
fn check_boxed(&mut self, check: Box<dyn HealthChecked>)
Add a health check.
Source§fn use_tracing(&self) -> bool
fn use_tracing(&self) -> bool
Allow the application to check if the runtime wants to enable tracing. Read more
Source§fn runtime_config(&self) -> &RuntimeConfig
fn runtime_config(&self) -> &RuntimeConfig
Access the runtime config.
Auto Trait Implementations§
impl<'m> Freeze for SubMain<'m>
impl<'m> !RefUnwindSafe for SubMain<'m>
impl<'m> !Send for SubMain<'m>
impl<'m> !Sync for SubMain<'m>
impl<'m> Unpin for SubMain<'m>
impl<'m> !UnwindSafe for SubMain<'m>
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> 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<S> SpawnerExt for S
impl<S> SpawnerExt for S
Source§impl<S> StartupExt for S
impl<S> StartupExt for S
Source§fn check_iter<I>(&mut self, iter: I)
fn check_iter<I>(&mut self, iter: I)
Add several health checks at once.