pub struct RuntimeContext { /* private fields */ }Expand description
Unified runtime context for AimDB services
Wraps the dyn-safe RuntimeOps capability surface so services can use
timing and logging without knowing the runtime adapter type. Cheap to
clone (one Arc).
Implementations§
Source§impl RuntimeContext
impl RuntimeContext
Sourcepub fn new(ops: Arc<dyn RuntimeOps>) -> Self
pub fn new(ops: Arc<dyn RuntimeOps>) -> Self
Create a new RuntimeContext from the dyn-safe runtime capabilities.
Sourcepub fn time(&self) -> Time<'_>
pub fn time(&self) -> Time<'_>
Access time utilities
Returns a time accessor for clock reads and sleeping.
Sourcepub fn ops(&self) -> &Arc<dyn RuntimeOps> ⓘ
pub fn ops(&self) -> &Arc<dyn RuntimeOps> ⓘ
Direct access to the underlying runtime capabilities.
Trait Implementations§
Source§impl Clone for RuntimeContext
impl Clone for RuntimeContext
Source§fn clone(&self) -> RuntimeContext
fn clone(&self) -> RuntimeContext
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 !RefUnwindSafe for RuntimeContext
impl !UnwindSafe for RuntimeContext
impl Freeze for RuntimeContext
impl Send for RuntimeContext
impl Sync for RuntimeContext
impl Unpin for RuntimeContext
impl UnsafeUnpin for RuntimeContext
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