pub enum PluginDirective {
AbortTurn {
code: String,
message: String,
},
EnqueueMessages {
messages: Vec<PluginMessage>,
},
CreateSession {
request: Box<SessionCreateRequest>,
},
ReplaceToolArgs {
args: Value,
},
ShortCircuitTool {
output: ToolCallOutput,
},
EmitRuntimeEvents {
events: Vec<PluginRuntimeEvent>,
},
EmitTrace {
name: String,
payload: Value,
context: Box<TraceContext>,
},
}Variants§
AbortTurn
EnqueueMessages
Fields
§
messages: Vec<PluginMessage>CreateSession
Fields
§
request: Box<SessionCreateRequest>ReplaceToolArgs
ShortCircuitTool
Fields
§
output: ToolCallOutputEmitRuntimeEvents
Fields
§
events: Vec<PluginRuntimeEvent>EmitTrace
Implementations§
Source§impl PluginDirective
impl PluginDirective
pub fn short_circuit(result: ToolResult) -> Self
pub fn into_tool_result(self) -> Option<ToolResult>
pub fn emit_runtime_events(events: Vec<PluginRuntimeEvent>) -> Self
pub fn emit_trace(name: impl Into<String>, payload: Value) -> Self
Trait Implementations§
Source§impl Clone for PluginDirective
impl Clone for PluginDirective
Source§fn clone(&self) -> PluginDirective
fn clone(&self) -> PluginDirective
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PluginDirective
impl Debug for PluginDirective
Source§impl<'de> Deserialize<'de> for PluginDirective
impl<'de> Deserialize<'de> for PluginDirective
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl !RefUnwindSafe for PluginDirective
impl !UnwindSafe for PluginDirective
impl Freeze for PluginDirective
impl Send for PluginDirective
impl Sync for PluginDirective
impl Unpin for PluginDirective
impl UnsafeUnpin for PluginDirective
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