PhaseContext

Trait PhaseContext 

Source
pub trait PhaseContext {
    // Required methods
    fn phase(&self) -> Phase;
    fn thread_id(&self) -> &str;
    fn messages(&self) -> &[Arc<Message>];
    fn run_policy(&self) -> &RunPolicy;
    fn run_identity(&self) -> &RunIdentity;
    fn state_of<T: State>(&self) -> T::Ref<'_>;
    fn snapshot(&self) -> Value;
}
Expand description

Shared read access available to all phase contexts.

Required Methods§

Source

fn phase(&self) -> Phase

Source

fn thread_id(&self) -> &str

Source

fn messages(&self) -> &[Arc<Message>]

Source

fn run_policy(&self) -> &RunPolicy

Source

fn run_identity(&self) -> &RunIdentity

Source

fn state_of<T: State>(&self) -> T::Ref<'_>

Source

fn snapshot(&self) -> Value

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<'s, 'a> PhaseContext for AfterInferenceContext<'s, 'a>

Source§

impl<'s, 'a> PhaseContext for AfterToolExecuteContext<'s, 'a>

Source§

impl<'s, 'a> PhaseContext for BeforeInferenceContext<'s, 'a>

Source§

impl<'s, 'a> PhaseContext for BeforeToolExecuteContext<'s, 'a>

Source§

impl<'s, 'a> PhaseContext for RunEndContext<'s, 'a>

Source§

impl<'s, 'a> PhaseContext for RunStartContext<'s, 'a>

Source§

impl<'s, 'a> PhaseContext for StepEndContext<'s, 'a>

Source§

impl<'s, 'a> PhaseContext for StepStartContext<'s, 'a>