pub struct Runtime<W, A, P: Process<W, A>>{ /* private fields */ }
Expand description
Node runtime
A runtime will create, initialize and run an instance of P
.
Parameters
W
the workload body type, e.g. EchoA
the application body type
Implementations§
Source§impl<W, A, P: Process<W, A>> Runtime<W, A, P>
impl<W, A, P: Process<W, A>> Runtime<W, A, P>
pub async fn new(args: Vec<String>, process: P) -> Result<Self>
Sourcepub async fn run_process(&self) -> Status
pub async fn run_process(&self) -> Status
Run the process
Run the runtime`s node process. The call will return
- on encountering a fatal error, or
- after Self::shutdown is called
Sourcepub async fn run_io_egress(&self)
pub async fn run_io_egress(&self)
Run IO egress until Self::shutdown is called
Sourcepub async fn run_io_ingress(&self)
pub async fn run_io_ingress(&self)
Run IO ingress until Self::shutdown is called
Auto Trait Implementations§
impl<W, A, P> Freeze for Runtime<W, A, P>where
P: Freeze,
impl<W, A, P> !RefUnwindSafe for Runtime<W, A, P>
impl<W, A, P> Send for Runtime<W, A, P>
impl<W, A, P> Sync for Runtime<W, A, P>
impl<W, A, P> Unpin for Runtime<W, A, P>where
P: Unpin,
impl<W, A, P> !UnwindSafe for Runtime<W, A, P>
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