pub struct AsupersyncRuntime { /* private fields */ }Expand description
Narrow runtime wrapper backed by asupersync.
Implementations§
Source§impl AsupersyncRuntime
impl AsupersyncRuntime
Sourcepub fn new() -> Result<Self>
pub fn new() -> Result<Self>
Build the current asupersync-backed runtime wrapper.
§Errors
Returns an error if the underlying runtime cannot be constructed.
Sourcepub fn block_on<T>(&self, future: impl Future<Output = T>) -> T
pub fn block_on<T>(&self, future: impl Future<Output = T>) -> T
Run a future on the owned runtime.
Sourcepub fn cancellation_handle() -> CancellationHandle
pub fn cancellation_handle() -> CancellationHandle
Create a Pureflow-owned cancellation handle for runtime-managed contexts.
Sourcepub fn run_node<E: NodeExecutor + ?Sized>(
&self,
node: &E,
ctx: NodeContext,
inputs: PortsIn,
outputs: PortsOut,
) -> Result<()>
pub fn run_node<E: NodeExecutor + ?Sized>( &self, node: &E, ctx: NodeContext, inputs: PortsIn, outputs: PortsOut, ) -> Result<()>
Execute one node on the owned runtime.
§Errors
Returns an error if cancellation was already requested, lifecycle observation fails, or the node executor reports one.
Sourcepub fn run_node_with_cancellation_handle<E: NodeExecutor + ?Sized>(
&self,
node: &E,
ctx: NodeContext,
inputs: PortsIn,
outputs: PortsOut,
cancellation: &CancellationHandle,
) -> Result<()>
pub fn run_node_with_cancellation_handle<E: NodeExecutor + ?Sized>( &self, node: &E, ctx: NodeContext, inputs: PortsIn, outputs: PortsOut, cancellation: &CancellationHandle, ) -> Result<()>
Execute one node with an externally drivable cancellation handle.
§Errors
Returns an error if cancellation was already requested or the node executor reports one.
Sourcepub fn run_node_with_metadata_sink<E, M>(
&self,
node: &E,
ctx: NodeContext,
inputs: PortsIn,
outputs: PortsOut,
metadata_sink: Arc<M>,
) -> Result<()>
pub fn run_node_with_metadata_sink<E, M>( &self, node: &E, ctx: NodeContext, inputs: PortsIn, outputs: PortsOut, metadata_sink: Arc<M>, ) -> Result<()>
Execute one node on the owned runtime and collect metadata.
§Errors
Returns an error if cancellation was already requested, metadata collection fails, lifecycle observation fails, or the node executor reports one.