pub struct RuntimeSpawner { /* private fields */ }Expand description
A Send + Sync, freely cloneable capability to spawn processes into a
Runtime, detached from the Runtime value itself. Exists because
super::supervisor::Supervisor needs to respawn processes from a
background monitor thread whose lifetime isn’t tied to the Runtime
object’s own (which owns non-Sync JoinHandles for its workers).
Implementations§
Source§impl RuntimeSpawner
impl RuntimeSpawner
pub fn spawn( &self, function: u32, args: &[Value], restart_policy: RestartPolicy, ) -> Result<FlowHandle, SpawnError>
pub fn metrics(&self) -> RuntimeMetricsSnapshot
Trait Implementations§
Source§impl Clone for RuntimeSpawner
impl Clone for RuntimeSpawner
Source§fn clone(&self) -> RuntimeSpawner
fn clone(&self) -> RuntimeSpawner
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl !RefUnwindSafe for RuntimeSpawner
impl !UnwindSafe for RuntimeSpawner
impl Freeze for RuntimeSpawner
impl Send for RuntimeSpawner
impl Sync for RuntimeSpawner
impl Unpin for RuntimeSpawner
impl UnsafeUnpin for RuntimeSpawner
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