pub struct IoRuntime { /* private fields */ }Expand description
Shared registry of thread-neutral I/O contexts for one Arty runtime.
This type is unstable Arty implementation infrastructure. Applications and
libraries should use arty instead.
The first registered context type is assigned the primary role. Later
context types are assigned the secondary role. Each worker-local
DriverHost creates drivers lazily when it first
accesses a registered context type.
Implementations§
Source§impl IoRuntime
impl IoRuntime
Sourcepub fn driver_host(
self,
thread: Thread,
owner_waker: Waker,
) -> Result<DriverHost, DriverError>
pub fn driver_host( self, thread: Thread, owner_waker: Waker, ) -> Result<DriverHost, DriverError>
Creates a worker-local driver host for one Arty async worker.
The supplied thread must identify the worker calling this method. The runtime relocates its worker-local telemetry state to that thread before constructing the host.
§Errors
Returns an error if thread does not identify the current thread.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for IoRuntime
impl !UnwindSafe for IoRuntime
impl Freeze for IoRuntime
impl Send for IoRuntime
impl Sync for IoRuntime
impl Unpin for IoRuntime
impl UnsafeUnpin for IoRuntime
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