Skip to main content

Invocation

Struct Invocation 

Source
pub struct Invocation { /* private fields */ }
Expand description

The closed per-call context supplied to one Executor::execute.

This is trusted runtime-provided context, never a dependency-injection bag: optional capabilities such as process execution are constructor-injected into the concrete executor and never flow through here.

The struct has no public constructor and no public fields, so only a core adapter can mint one. Its emit capability is limited to crate::runtime::event::ToolEmitter, which itself can only produce audit and error facts, so producer authority and outward event state never leak to an executor.

Implementations§

Source§

impl Invocation

Source

pub fn session_id(&self) -> Option<&str>

Returns the trusted host-provided session identity, when one exists.

Core does not require this to be nonempty or globally unique; treat it as correlation metadata rather than an authorization credential. Model tool arguments can never override it.

Source

pub const fn transcript(&self) -> &Snapshot

Returns the frozen Step-top transcript shared by every provider resolution and every invocation in the same Step.

Source

pub const fn call_id(&self) -> &Id

Returns the model-assigned identity of this invocation within its Step.

Source

pub const fn emitter(&self) -> &ToolEmitter

Returns the invocation-scoped audit/error emit capability.

Trait Implementations§

Source§

impl Debug for Invocation

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.