pub struct Runtime { /* private fields */ }Expand description
Main runtime for supervising and running nodes
Implementations§
Source§impl Runtime
impl Runtime
Sourcepub fn builder() -> RuntimeBuilder
pub fn builder() -> RuntimeBuilder
Create a new runtime builder
Sourcepub async fn run_node(
&mut self,
name: &str,
node: Box<dyn NodeRunner>,
) -> Result<()>
pub async fn run_node( &mut self, name: &str, node: Box<dyn NodeRunner>, ) -> Result<()>
Run a single node until completion or shutdown
Sourcepub async fn run_nodes(&mut self, nodes: Vec<Box<dyn NodeRunner>>) -> Result<()>
pub async fn run_nodes(&mut self, nodes: Vec<Box<dyn NodeRunner>>) -> Result<()>
Run multiple nodes until all complete or shutdown
Sourcepub fn health_checker(&self) -> &Arc<HealthChecker> ⓘ
pub fn health_checker(&self) -> &Arc<HealthChecker> ⓘ
Get the health checker
Sourcepub fn supervisor(&self) -> &Arc<Supervisor> ⓘ
pub fn supervisor(&self) -> &Arc<Supervisor> ⓘ
Get the supervisor
Sourcepub fn shutdown(&self) -> &ShutdownHandle
pub fn shutdown(&self) -> &ShutdownHandle
Get the shutdown handle
Auto Trait Implementations§
impl !RefUnwindSafe for Runtime
impl !UnwindSafe for Runtime
impl Freeze for Runtime
impl Send for Runtime
impl Sync for Runtime
impl Unpin for Runtime
impl UnsafeUnpin for Runtime
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<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more