pub struct QueryOptionsBuilder { /* private fields */ }Expand description
Builder for QueryOptions.
Implementations§
Source§impl QueryOptionsBuilder
impl QueryOptionsBuilder
Sourcepub fn cwd<VALUE: Into<Option<PathBuf>>>(&mut self, value: VALUE) -> &mut Self
pub fn cwd<VALUE: Into<Option<PathBuf>>>(&mut self, value: VALUE) -> &mut Self
Working directory for the session
Sourcepub fn model<VALUE: Into<Option<String>>>(&mut self, value: VALUE) -> &mut Self
pub fn model<VALUE: Into<Option<String>>>(&mut self, value: VALUE) -> &mut Self
AI model to use (e.g., “qwen-max”, “qwen-plus”)
Sourcepub fn path_to_qwen_executable<VALUE: Into<Option<String>>>(
&mut self,
value: VALUE,
) -> &mut Self
pub fn path_to_qwen_executable<VALUE: Into<Option<String>>>( &mut self, value: VALUE, ) -> &mut Self
Path to qwen executable (auto-detected if None)
Sourcepub fn permission_mode(&mut self, value: PermissionMode) -> &mut Self
pub fn permission_mode(&mut self, value: PermissionMode) -> &mut Self
Permission mode for tool approval
Sourcepub fn env(&mut self, value: Option<HashMap<String, String>>) -> &mut Self
pub fn env(&mut self, value: Option<HashMap<String, String>>) -> &mut Self
Environment variables merged with current process
Sourcepub fn system_prompt(&mut self, value: Option<SystemPromptConfig>) -> &mut Self
pub fn system_prompt(&mut self, value: Option<SystemPromptConfig>) -> &mut Self
System prompt configuration
Sourcepub fn mcp_servers(
&mut self,
value: Option<HashMap<String, McpServerConfig>>,
) -> &mut Self
pub fn mcp_servers( &mut self, value: Option<HashMap<String, McpServerConfig>>, ) -> &mut Self
MCP servers configuration
Sourcepub fn max_session_turns(&mut self, value: i32) -> &mut Self
pub fn max_session_turns(&mut self, value: i32) -> &mut Self
Maximum session turns (-1 for unlimited)
Sourcepub fn core_tools(&mut self, value: Option<Vec<String>>) -> &mut Self
pub fn core_tools(&mut self, value: Option<Vec<String>>) -> &mut Self
Allowlist of tools
Sourcepub fn exclude_tools(&mut self, value: Option<Vec<String>>) -> &mut Self
pub fn exclude_tools(&mut self, value: Option<Vec<String>>) -> &mut Self
Denylist of tools
Sourcepub fn allowed_tools(&mut self, value: Option<Vec<String>>) -> &mut Self
pub fn allowed_tools(&mut self, value: Option<Vec<String>>) -> &mut Self
Tools that bypass can_use_tool and auto-execute
Sourcepub fn agents(&mut self, value: Option<Vec<SubagentConfig>>) -> &mut Self
pub fn agents(&mut self, value: Option<Vec<SubagentConfig>>) -> &mut Self
Subagent configuration
Sourcepub fn include_partial_messages(&mut self, value: bool) -> &mut Self
pub fn include_partial_messages(&mut self, value: bool) -> &mut Self
Include partial messages during generation
Sourcepub fn resume<VALUE: Into<Option<String>>>(&mut self, value: VALUE) -> &mut Self
pub fn resume<VALUE: Into<Option<String>>>(&mut self, value: VALUE) -> &mut Self
Session ID to resume history
Sourcepub fn session_id<VALUE: Into<Option<String>>>(
&mut self,
value: VALUE,
) -> &mut Self
pub fn session_id<VALUE: Into<Option<String>>>( &mut self, value: VALUE, ) -> &mut Self
Session ID without resuming history
Sourcepub fn timeouts(&mut self, value: Option<TimeoutConfig>) -> &mut Self
pub fn timeouts(&mut self, value: Option<TimeoutConfig>) -> &mut Self
Timeout configuration
Sourcepub fn build(&self) -> Result<QueryOptions, QueryOptionsBuilderError>
pub fn build(&self) -> Result<QueryOptions, QueryOptionsBuilderError>
Trait Implementations§
Source§impl Clone for QueryOptionsBuilder
impl Clone for QueryOptionsBuilder
Source§fn clone(&self) -> QueryOptionsBuilder
fn clone(&self) -> QueryOptionsBuilder
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 moreAuto Trait Implementations§
impl Freeze for QueryOptionsBuilder
impl RefUnwindSafe for QueryOptionsBuilder
impl Send for QueryOptionsBuilder
impl Sync for QueryOptionsBuilder
impl Unpin for QueryOptionsBuilder
impl UnsafeUnpin for QueryOptionsBuilder
impl UnwindSafe for QueryOptionsBuilder
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