pub struct RuntimeContext<'a> { /* private fields */ }Available on crate feature
dfir_context only.Expand description
A handle to DFIR Context which can be used inside quoted code.
When spliced, it turns into a reference to Context.
The exposed type is &Context<()> (the “no metrics” typestate), since whether the actual
runtime context tracks metrics is only decided at deploy time (e.g. by telemetry sidecars).
Context<()> only exposes the methods available on every Context<M> (e.g.
Context::current_tick), so quoted code type-checked against it will also compile against
the real context regardless of which metrics typestate it ends up with.
Trait Implementations§
Source§impl<'a> Clone for RuntimeContext<'a>
impl<'a> Clone for RuntimeContext<'a>
impl<'a> Copy for RuntimeContext<'a>
Auto Trait Implementations§
impl<'a> Freeze for RuntimeContext<'a>
impl<'a> RefUnwindSafe for RuntimeContext<'a>
impl<'a> Send for RuntimeContext<'a>
impl<'a> Sync for RuntimeContext<'a>
impl<'a> Unpin for RuntimeContext<'a>
impl<'a> UnsafeUnpin for RuntimeContext<'a>
impl<'a> UnwindSafe for RuntimeContext<'a>
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreCreates a shared type from an unshared type.