pub struct Main<'m> { /* private fields */ }Expand description
A main runner.
The idea of the main runner is to perform all setup steps, gathering all tasks (futures) to be executed, and then initialize the stack and drive the tasks, until one of them completes.
In some cases it might be necessary to run a set of tasks on a different context (like actix, or
ntex). In this case it is possible to create a SubMain instance using SubMain::sub_main.
Implementations§
Methods from Deref<Target = SubMain<'m>>§
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 Startup for Main<'_>
impl Startup for Main<'_>
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 Main<'m>
impl<'m> !RefUnwindSafe for Main<'m>
impl<'m> !Send for Main<'m>
impl<'m> !Sync for Main<'m>
impl<'m> Unpin for Main<'m>
impl<'m> !UnwindSafe for Main<'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.