AgentOutput

Trait AgentOutput 

Source
pub trait AgentOutput {
    // Required methods
    fn output_raw(
        &self,
        ctx: AgentContext,
        pin: String,
        value: AgentValue,
    ) -> Pin<Box<dyn Future<Output = Result<(), AgentError>> + Send + '_>>;
    fn try_output_raw(
        &self,
        ctx: AgentContext,
        pin: String,
        value: AgentValue,
    ) -> Result<(), AgentError>;
    fn emit_config_updated_raw(&self, key: String, value: AgentValue);
    fn emit_agent_spec_updated_raw(&self);
    fn emit_error_raw(&self, message: String);

    // Provided methods
    fn output<S: Into<String>>(
        &self,
        ctx: AgentContext,
        pin: S,
        value: AgentValue,
    ) -> Pin<Box<dyn Future<Output = Result<(), AgentError>> + Send + '_>> { ... }
    fn try_output<S: Into<String>>(
        &self,
        ctx: AgentContext,
        pin: S,
        value: AgentValue,
    ) -> Result<(), AgentError> { ... }
    fn emit_config_updated<S: Into<String>>(&self, key: S, value: AgentValue) { ... }
    fn emit_agent_spec_updated(&self) { ... }
    fn emit_error<S: Into<String>>(&self, message: S) { ... }
}

Required Methods§

Source

fn output_raw( &self, ctx: AgentContext, pin: String, value: AgentValue, ) -> Pin<Box<dyn Future<Output = Result<(), AgentError>> + Send + '_>>

Source

fn try_output_raw( &self, ctx: AgentContext, pin: String, value: AgentValue, ) -> Result<(), AgentError>

Source

fn emit_config_updated_raw(&self, key: String, value: AgentValue)

Source

fn emit_agent_spec_updated_raw(&self)

Source

fn emit_error_raw(&self, message: String)

Provided Methods§

Source

fn output<S: Into<String>>( &self, ctx: AgentContext, pin: S, value: AgentValue, ) -> Pin<Box<dyn Future<Output = Result<(), AgentError>> + Send + '_>>

Source

fn try_output<S: Into<String>>( &self, ctx: AgentContext, pin: S, value: AgentValue, ) -> Result<(), AgentError>

Source

fn emit_config_updated<S: Into<String>>(&self, key: S, value: AgentValue)

Source

fn emit_agent_spec_updated(&self)

Source

fn emit_error<S: Into<String>>(&self, message: S)

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<T: Agent> AgentOutput for T