pub trait ClaudeCodeRunner: Send + Sync {
// Required method
fn stream<'life0, 'async_trait>(
&'life0 self,
options: ClaudeAgentOptions,
content: UserMessageInput,
) -> Pin<Box<dyn Future<Output = Result<UnboundedReceiver<StreamEvent>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
// Provided method
fn stream_with_cleanup<'life0, 'async_trait>(
&'life0 self,
options: ClaudeAgentOptions,
content: UserMessageInput,
) -> Pin<Box<dyn Future<Output = Result<ClaudeCodeStream>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
}Required Methods§
fn stream<'life0, 'async_trait>(
&'life0 self,
options: ClaudeAgentOptions,
content: UserMessageInput,
) -> Pin<Box<dyn Future<Output = Result<UnboundedReceiver<StreamEvent>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Provided Methods§
Sourcefn stream_with_cleanup<'life0, 'async_trait>(
&'life0 self,
options: ClaudeAgentOptions,
content: UserMessageInput,
) -> Pin<Box<dyn Future<Output = Result<ClaudeCodeStream>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn stream_with_cleanup<'life0, 'async_trait>(
&'life0 self,
options: ClaudeAgentOptions,
content: UserMessageInput,
) -> Pin<Box<dyn Future<Output = Result<ClaudeCodeStream>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Starts the stream together with an optional provider-owned cleanup
acknowledgement. Test runners and SDK-independent implementations can
keep implementing Self::stream; the default advertises no owned
subprocess cleanup.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".