pub struct SDKControlInterruptRequest { /* private fields */ }Expand description
SDK control message to gracefully interrupt a running Claude session.
When written to the CLI subprocess’s stdin, this tells Claude to stop its current response and return control to the caller without killing the session.
This corresponds to the TypeScript SDK’s SDKControlInterruptRequest type
and is distinct from closing or aborting the subprocess.
§Example
use claude_codes::SDKControlInterruptRequest;
let interrupt = SDKControlInterruptRequest::new();
let json = serde_json::to_string(&interrupt).unwrap();
assert_eq!(json, r#"{"subtype":"interrupt"}"#);Implementations§
Trait Implementations§
Source§impl Clone for SDKControlInterruptRequest
impl Clone for SDKControlInterruptRequest
Source§fn clone(&self) -> SDKControlInterruptRequest
fn clone(&self) -> SDKControlInterruptRequest
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 SDKControlInterruptRequest
impl Debug for SDKControlInterruptRequest
Source§impl Default for SDKControlInterruptRequest
impl Default for SDKControlInterruptRequest
Source§impl<'de> Deserialize<'de> for SDKControlInterruptRequest
impl<'de> Deserialize<'de> for SDKControlInterruptRequest
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 SDKControlInterruptRequest
impl RefUnwindSafe for SDKControlInterruptRequest
impl Send for SDKControlInterruptRequest
impl Sync for SDKControlInterruptRequest
impl Unpin for SDKControlInterruptRequest
impl UnsafeUnpin for SDKControlInterruptRequest
impl UnwindSafe for SDKControlInterruptRequest
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