pub struct RuntimeHandle { /* private fields */ }Implementations§
Source§impl RuntimeHandle
impl RuntimeHandle
pub fn single_threaded<E: ModrpcExecutor>( ex: &mut E, ) -> (Self, RuntimeShutdownHandle)
pub fn globals(&self) -> &Arc<Mutex<ContextMap>>
pub fn get_worker(&self, worker_id: WorkerId) -> &WorkerHandle
pub fn local_worker_context(&self) -> Option<&WorkerContext>
pub async fn add_transport( &self, builder: impl TransportBuilder, ) -> TransportHandle
pub async fn run_on_all_workers( &self, f: impl FnOnce(&WorkerContext) + Clone + Send + 'static, )
pub async fn run_on_all_other_workers( &self, f: impl FnOnce(&WorkerContext) + Clone + Send + 'static, )
pub fn start_role<Role>( &self, config: RoleConfig<Role>, ) -> StartRoleHandle<Role>
Trait Implementations§
Source§impl Clone for RuntimeHandle
impl Clone for RuntimeHandle
Source§fn clone(&self) -> RuntimeHandle
fn clone(&self) -> RuntimeHandle
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Send for RuntimeHandle
impl Sync for RuntimeHandle
Auto Trait Implementations§
impl Freeze for RuntimeHandle
impl !RefUnwindSafe for RuntimeHandle
impl Unpin for RuntimeHandle
impl !UnwindSafe for RuntimeHandle
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