pub struct RuntimeSpawner { /* private fields */ }Expand description
A Send + Sync, freely cloneable capability to spawn flows into a
Runtime, detached from the Runtime value itself. Exists because
super::supervisor::Supervisor needs to respawn flows 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>
Sourcepub fn spawn_untrusted(
&self,
function: u32,
args: &[Value],
restart_policy: RestartPolicy,
) -> Result<FlowHandle, SpawnError>
pub fn spawn_untrusted( &self, function: u32, args: &[Value], restart_policy: RestartPolicy, ) -> Result<FlowHandle, SpawnError>
Host spawn with RootAuthorityPolicy::Untrusted.
pub fn metrics(&self) -> RuntimeMetricsSnapshot
Trait Implementations§
Auto 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