pub enum ClaudeCodeMethod {
Create {
name: String,
working_dir: String,
model: Model,
system_prompt: Option<String>,
loopback_enabled: Option<bool>,
},
Chat {
name: String,
prompt: String,
ephemeral: Option<bool>,
},
Get {
name: String,
},
List,
Delete {
name: String,
},
Fork {
name: String,
new_name: String,
},
ChatAsync {
name: String,
prompt: String,
ephemeral: Option<bool>,
},
Poll {
stream_id: StreamId,
from_seq: Option<u64>,
limit: Option<u64>,
},
Streams {
session_id: Option<ClaudeCodeId>,
},
}Expand description
Auto-generated method enum for schema extraction
Variants§
Create
Create a new Claude Code session
Fields
Chat
Chat with a session, streaming tokens like Cone
Get
Get session configuration details
List
List all Claude Code sessions
Delete
Delete a session
Fork
Fork a session to create a branch point
ChatAsync
Start an async chat - returns immediately with stream_id for polling This is the non-blocking version of chat, designed for loopback scenarios where the parent needs to poll for events and handle tool approvals.
Poll
Poll a stream for new events Returns events since the last poll (or from the specified offset). Use this to read events from an async chat started with chat_async.
Streams
List active streams Returns all active streams, optionally filtered by session.
Fields
session_id: Option<ClaudeCodeId>Implementations§
Source§impl ClaudeCodeMethod
impl ClaudeCodeMethod
pub fn all_method_names() -> &'static [&'static str]
Source§impl ClaudeCodeMethod
impl ClaudeCodeMethod
Sourcepub fn method_schemas() -> Vec<MethodSchema>
pub fn method_schemas() -> Vec<MethodSchema>
Get per-method schema info including params, return types, and content hashes
Note: This method has O(1) schema lookup cost after first call due to caching.
Trait Implementations§
Source§impl Clone for ClaudeCodeMethod
impl Clone for ClaudeCodeMethod
Source§fn clone(&self) -> ClaudeCodeMethod
fn clone(&self) -> ClaudeCodeMethod
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ClaudeCodeMethod
impl Debug for ClaudeCodeMethod
Source§impl<'de> Deserialize<'de> for ClaudeCodeMethod
impl<'de> Deserialize<'de> for ClaudeCodeMethod
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>,
Source§impl JsonSchema for ClaudeCodeMethod
impl JsonSchema for ClaudeCodeMethod
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read moreSource§impl MethodEnumSchema for ClaudeCodeMethod
impl MethodEnumSchema for ClaudeCodeMethod
Source§fn method_names() -> &'static [&'static str]
fn method_names() -> &'static [&'static str]
Source§fn schema_with_consts() -> Value
fn schema_with_consts() -> Value
Auto Trait Implementations§
impl Freeze for ClaudeCodeMethod
impl RefUnwindSafe for ClaudeCodeMethod
impl Send for ClaudeCodeMethod
impl Sync for ClaudeCodeMethod
impl Unpin for ClaudeCodeMethod
impl UnsafeUnpin for ClaudeCodeMethod
impl UnwindSafe for ClaudeCodeMethod
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more