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§
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)
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.