#[non_exhaustive]pub enum Hook {
Command(CommandHook),
Prompt(PromptHook),
Agent(AgentHook),
Http(HttpHook),
McpTool(McpToolHook),
Other(Map<String, Value>),
}Expand description
A hook, by its type.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Command(CommandHook)
command: run a shell command (or a program, with args).
Prompt(PromptHook)
prompt: ask a model about the event.
Agent(AgentHook)
agent: have an agent verify something.
Http(HttpHook)
http: POST the event to a URL.
McpTool(McpToolHook)
mcp_tool: call a tool on a connected MCP server.
Other(Map<String, Value>)
A type this crate doesn’t know (or none), the whole object as
written.
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Hook
impl<'de> Deserialize<'de> for Hook
Source§fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
impl StructuralPartialEq for Hook
Auto Trait Implementations§
impl Forget for Hook
impl Freeze for Hook
impl Move for Hook
impl RefUnwindSafe for Hook
impl Send for Hook
impl Sync for Hook
impl Unpin for Hook
impl UnsafeUnpin for Hook
impl UnwindSafe for Hook
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