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
crate::scheduler::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 Forget for RuntimeSpawner
impl Freeze for RuntimeSpawnerwhere
*const ArcInner<Shared> is !null: Freeze,
PhantomData<ArcInner<Shared>>: Freeze,
*const ArcInner<Chunk> is !null: Freeze,
PhantomData<ArcInner<Chunk>>: Freeze,
*const ArcInner<NativeTable> is !null: Freeze,
PhantomData<ArcInner<NativeTable>>: Freeze,
impl Move for RuntimeSpawner
impl Send for RuntimeSpawner
impl Sync for RuntimeSpawner
impl Unpin for RuntimeSpawner
impl UnsafeUnpin for RuntimeSpawnerwhere
*const ArcInner<Shared> is !null: UnsafeUnpin,
PhantomData<ArcInner<Shared>>: UnsafeUnpin,
*const ArcInner<Chunk> is !null: UnsafeUnpin,
PhantomData<ArcInner<Chunk>>: UnsafeUnpin,
*const ArcInner<NativeTable> is !null: UnsafeUnpin,
PhantomData<ArcInner<NativeTable>>: UnsafeUnpin,
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