pub struct RuntimeInspector<Runtime> {
pub matches_request: fn(&Runtime, &AppServerTurnRequest) -> bool,
pub pid: fn(&Runtime) -> Option<u32>,
pub provider_conversation_id: fn(&Runtime) -> Option<String>,
pub restored_context: fn(&Runtime) -> bool,
}Expand description
Callbacks for inspecting runtime state during turn execution.
Bundles the query functions that run_turn_with_restart_retry uses to
check whether the runtime matches the current request, whether it restored
provider-native context, and to extract identifiers.
Fields§
§matches_request: fn(&Runtime, &AppServerTurnRequest) -> boolReturns true when the existing runtime is compatible with the request.
pid: fn(&Runtime) -> Option<u32>Returns the OS process id of the runtime, when available.
provider_conversation_id: fn(&Runtime) -> Option<String>Returns the provider-native conversation id, when available.
restored_context: fn(&Runtime) -> boolReturns true when the runtime bootstrapped by restoring prior context.
Auto Trait Implementations§
impl<Runtime> Freeze for RuntimeInspector<Runtime>
impl<Runtime> RefUnwindSafe for RuntimeInspector<Runtime>
impl<Runtime> Send for RuntimeInspector<Runtime>
impl<Runtime> Sync for RuntimeInspector<Runtime>
impl<Runtime> Unpin for RuntimeInspector<Runtime>
impl<Runtime> UnsafeUnpin for RuntimeInspector<Runtime>
impl<Runtime> UnwindSafe for RuntimeInspector<Runtime>
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoMaybeUndefined<T> for T
impl<T> IntoMaybeUndefined<T> for T
Source§fn into_maybe_undefined(self) -> MaybeUndefined<T>
fn into_maybe_undefined(self) -> MaybeUndefined<T>
Converts this value into a three-state builder argument.
Source§impl<T> IntoOption<T> for T
impl<T> IntoOption<T> for T
Source§fn into_option(self) -> Option<T>
fn into_option(self) -> Option<T>
Converts this value into an optional builder argument.