pub struct QueryOptions {Show 18 fields
pub cwd: Option<PathBuf>,
pub model: Option<String>,
pub path_to_qwen_executable: Option<String>,
pub permission_mode: PermissionMode,
pub env: Option<HashMap<String, String>>,
pub system_prompt: Option<SystemPromptConfig>,
pub mcp_servers: Option<HashMap<String, McpServerConfig>>,
pub debug: bool,
pub max_session_turns: i32,
pub core_tools: Option<Vec<String>>,
pub exclude_tools: Option<Vec<String>>,
pub allowed_tools: Option<Vec<String>>,
pub auth_type: AuthType,
pub agents: Option<Vec<SubagentConfig>>,
pub include_partial_messages: bool,
pub resume: Option<String>,
pub session_id: Option<String>,
pub timeouts: Option<TimeoutConfig>,
}Expand description
Query options for configuring SDK behavior
Fields§
§cwd: Option<PathBuf>Working directory for the session
model: Option<String>AI model to use (e.g., “qwen-max”, “qwen-plus”)
path_to_qwen_executable: Option<String>Path to qwen executable (auto-detected if None)
permission_mode: PermissionModePermission mode for tool approval
env: Option<HashMap<String, String>>Environment variables merged with current process
system_prompt: Option<SystemPromptConfig>System prompt configuration
mcp_servers: Option<HashMap<String, McpServerConfig>>MCP servers configuration
debug: boolEnable debug logging
max_session_turns: i32Maximum session turns (-1 for unlimited)
core_tools: Option<Vec<String>>Allowlist of tools
exclude_tools: Option<Vec<String>>Denylist of tools
allowed_tools: Option<Vec<String>>Tools that bypass can_use_tool and auto-execute
auth_type: AuthTypeAuthentication type
agents: Option<Vec<SubagentConfig>>Subagent configuration
include_partial_messages: boolInclude partial messages during generation
resume: Option<String>Session ID to resume history
session_id: Option<String>Session ID without resuming history
timeouts: Option<TimeoutConfig>Timeout configuration
Trait Implementations§
Source§impl Clone for QueryOptions
impl Clone for QueryOptions
Source§fn clone(&self) -> QueryOptions
fn clone(&self) -> QueryOptions
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 QueryOptions
impl Debug for QueryOptions
Source§impl Default for QueryOptions
impl Default for QueryOptions
Source§impl<'de> Deserialize<'de> for QueryOptions
impl<'de> Deserialize<'de> for QueryOptions
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 QueryOptions
impl RefUnwindSafe for QueryOptions
impl Send for QueryOptions
impl Sync for QueryOptions
impl Unpin for QueryOptions
impl UnsafeUnpin for QueryOptions
impl UnwindSafe for QueryOptions
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