#[non_exhaustive]pub enum HandlerResponse {
Ok,
Permission(PermissionResult),
UserInput(Option<UserInputResponse>),
ToolResult(ToolResult),
Elicitation(ElicitationResult),
ExitPlanMode(ExitPlanModeResult),
AutoModeSwitch(AutoModeSwitchResponse),
}Expand description
Response from the handler back to the SDK, used to construct the JSON-RPC reply sent to the CLI.
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.
Ok
No response needed (used for fire-and-forget SessionEvents).
Permission(PermissionResult)
Permission decision.
UserInput(Option<UserInputResponse>)
User input response (or None to signal no input available).
ToolResult(ToolResult)
Result of a tool execution.
Elicitation(ElicitationResult)
Elicitation result (accept/decline/cancel with optional form data).
ExitPlanMode(ExitPlanModeResult)
Exit plan mode decision.
AutoModeSwitch(AutoModeSwitchResponse)
Auto-mode-switch decision.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for HandlerResponse
impl RefUnwindSafe for HandlerResponse
impl Send for HandlerResponse
impl Sync for HandlerResponse
impl Unpin for HandlerResponse
impl UnsafeUnpin for HandlerResponse
impl UnwindSafe for HandlerResponse
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