pub struct RuntimeContext<R>where
R: Runtime,{ /* private fields */ }Expand description
Unified runtime context for AimDB services
Provides access to runtime capabilities (sleep, timestamps) through a unified API, abstracting the underlying runtime implementation.
Services receive this context for timing operations without knowing about the specific runtime adapter.
Implementations§
Source§impl<R> RuntimeContext<R>where
R: Runtime,
impl<R> RuntimeContext<R>where
R: Runtime,
Sourcepub fn extract_from_any(ctx_any: Arc<dyn Any + Send + Sync>) -> Self
pub fn extract_from_any(ctx_any: Arc<dyn Any + Send + Sync>) -> Self
Extract runtime context from type-erased Arc (std version)
This is a helper for runtime adapters to convert the raw Arc<dyn Any>
context passed to .source_raw() and .tap_raw() into a typed RuntimeContext.
§Panics
Panics if the runtime type doesn’t match R.
Source§impl<R> RuntimeContext<R>where
R: Runtime,
impl<R> RuntimeContext<R>where
R: Runtime,
Source§impl<R> RuntimeContext<R>where
R: Runtime,
impl<R> RuntimeContext<R>where
R: Runtime,
Sourcepub fn from_runtime(runtime: R) -> Self
pub fn from_runtime(runtime: R) -> Self
Create a RuntimeContext from a runtime adapter (std version with Arc)
Trait Implementations§
Source§impl<R> Clone for RuntimeContext<R>
impl<R> Clone for RuntimeContext<R>
Source§fn clone(&self) -> RuntimeContext<R>
fn clone(&self) -> RuntimeContext<R>
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 moreAuto Trait Implementations§
impl<R> Freeze for RuntimeContext<R>
impl<R> RefUnwindSafe for RuntimeContext<R>where
R: RefUnwindSafe,
impl<R> Send for RuntimeContext<R>
impl<R> Sync for RuntimeContext<R>
impl<R> Unpin for RuntimeContext<R>
impl<R> UnwindSafe for RuntimeContext<R>where
R: RefUnwindSafe,
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