pub enum HookCommand {
Command {
command: String,
shell: Option<String>,
if_condition: Option<String>,
timeout: Option<u64>,
status_message: Option<String>,
once: Option<bool>,
async: Option<bool>,
async_rewake: Option<bool>,
},
Prompt {
prompt: String,
if_condition: Option<String>,
timeout: Option<u64>,
model: Option<String>,
status_message: Option<String>,
once: Option<bool>,
},
Agent {
prompt: String,
if_condition: Option<String>,
timeout: Option<u64>,
model: Option<String>,
status_message: Option<String>,
once: Option<bool>,
},
Http {
url: String,
if_condition: Option<String>,
timeout: Option<u64>,
headers: Option<HashMap<String, String>>,
allowed_env_vars: Option<Vec<String>>,
status_message: Option<String>,
once: Option<bool>,
},
}Expand description
Hook command types
Serialized/deserialized with #[serde(tag = "type")] to match the
TypeScript discriminated union: command | prompt | agent | http.
Variants§
Trait Implementations§
Source§impl Clone for HookCommand
impl Clone for HookCommand
Source§fn clone(&self) -> HookCommand
fn clone(&self) -> HookCommand
Returns a duplicate of the value. Read more
1.0.0 · 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 HookCommand
impl Debug for HookCommand
Source§impl<'de> Deserialize<'de> for HookCommand
impl<'de> Deserialize<'de> for HookCommand
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 Freeze for HookCommand
impl RefUnwindSafe for HookCommand
impl Send for HookCommand
impl Sync for HookCommand
impl Unpin for HookCommand
impl UnsafeUnpin for HookCommand
impl UnwindSafe for HookCommand
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