#[non_exhaustive]pub enum HookOutput {
None,
PreToolUse(PreToolUseOutput),
PostToolUse(PostToolUseOutput),
UserPromptSubmitted(UserPromptSubmittedOutput),
SessionStart(SessionStartOutput),
SessionEnd(SessionEndOutput),
ErrorOccurred(ErrorOccurredOutput),
}Expand description
Response from SessionHooks::on_hook back to the SDK.
Return the variant matching the HookEvent you received, or
HookOutput::None to indicate no hook is registered for that event.
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.
None
No hook registered — the SDK returns an empty output object to the CLI.
PreToolUse(PreToolUseOutput)
Response for a pre-tool-use hook.
PostToolUse(PostToolUseOutput)
Response for a post-tool-use hook.
UserPromptSubmitted(UserPromptSubmittedOutput)
Response for a user-prompt-submitted hook.
SessionStart(SessionStartOutput)
Response for a session-start hook.
SessionEnd(SessionEndOutput)
Response for a session-end hook.
ErrorOccurred(ErrorOccurredOutput)
Response for an error-occurred hook.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for HookOutput
impl RefUnwindSafe for HookOutput
impl Send for HookOutput
impl Sync for HookOutput
impl Unpin for HookOutput
impl UnsafeUnpin for HookOutput
impl UnwindSafe for HookOutput
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