Struct ockam_node::Executor
source · pub struct Executor { /* private fields */ }
Expand description
Underlying Ockam node executor
This type is a small wrapper around an inner async runtime (tokio
by
default) and the Ockam router. In most cases it is recommended you use the
ockam::node
function annotation instead!
Implementations§
source§impl Executor
impl Executor
sourcepub fn execute<F>(&mut self, future: F) -> Result<F::Output>where
F: Future + Send + 'static,
F::Output: Send + 'static,
pub fn execute<F>(&mut self, future: F) -> Result<F::Output>where
F: Future + Send + 'static,
F::Output: Send + 'static,
Initialise and run the Ockam node executor context
In this background this launches async execution of the Ockam router, while blocking execution on the provided future.
Any errors encountered by the router or provided application code will be returned from this function.