pub struct ClaudeSettings {Show 18 fields
pub env: Option<HashMap<String, String>>,
pub model: Option<String>,
pub output_style: Option<String>,
pub include_co_authored_by: Option<bool>,
pub permissions: Option<Permissions>,
pub hooks: Option<Hooks>,
pub api_key_helper: Option<String>,
pub cleanup_period_days: Option<u32>,
pub disable_all_hooks: Option<bool>,
pub force_login_method: Option<String>,
pub force_login_org_uuid: Option<String>,
pub enable_all_project_mcp_servers: Option<bool>,
pub enabled_mcpjson_servers: Option<Vec<String>>,
pub disabled_mcpjson_servers: Option<Vec<String>>,
pub aws_auth_refresh: Option<String>,
pub aws_credential_export: Option<String>,
pub status_line: Option<StatusLine>,
pub subagent_model: Option<String>,
}Expand description
Main Claude Code settings structure
Fields§
§env: Option<HashMap<String, String>>§model: Option<String>§output_style: Option<String>§permissions: Option<Permissions>§hooks: Option<Hooks>§api_key_helper: Option<String>§cleanup_period_days: Option<u32>§disable_all_hooks: Option<bool>§force_login_method: Option<String>§force_login_org_uuid: Option<String>§enable_all_project_mcp_servers: Option<bool>§enabled_mcpjson_servers: Option<Vec<String>>§disabled_mcpjson_servers: Option<Vec<String>>§aws_auth_refresh: Option<String>§aws_credential_export: Option<String>§status_line: Option<StatusLine>§subagent_model: Option<String>Implementations§
Source§impl ClaudeSettings
impl ClaudeSettings
Sourcepub fn capture_environment() -> HashMap<String, String>
pub fn capture_environment() -> HashMap<String, String>
Capture environment variables relevant to Claude Code
Sourcepub fn capture_template_environment(
template_type: &TemplateType,
) -> HashMap<String, String>
pub fn capture_template_environment( template_type: &TemplateType, ) -> HashMap<String, String>
Capture environment variables for a specific template type
Sourcepub fn mask_api_keys(&self) -> Self
pub fn mask_api_keys(&self) -> Self
Mask API keys in settings for display
Sourcepub fn get_api_key(&self) -> Option<String>
pub fn get_api_key(&self) -> Option<String>
Get API key from settings or environment
Trait Implementations§
Source§impl Clone for ClaudeSettings
impl Clone for ClaudeSettings
Source§fn clone(&self) -> ClaudeSettings
fn clone(&self) -> ClaudeSettings
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 Configurable for ClaudeSettings
impl Configurable for ClaudeSettings
Source§fn merge_with(self, other: Self) -> Self
fn merge_with(self, other: Self) -> Self
Merge this configuration with another, with priority given to self
Source§fn filter_by_scope(self, scope: &SnapshotScope) -> Self
fn filter_by_scope(self, scope: &SnapshotScope) -> Self
Filter settings by the specified scope
Source§fn mask_sensitive_data(self) -> Self
fn mask_sensitive_data(self) -> Self
Mask sensitive data for display purposes
Source§impl Debug for ClaudeSettings
impl Debug for ClaudeSettings
Source§impl Default for ClaudeSettings
impl Default for ClaudeSettings
Source§fn default() -> ClaudeSettings
fn default() -> ClaudeSettings
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for ClaudeSettings
impl<'de> Deserialize<'de> for ClaudeSettings
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
Source§impl PartialEq for ClaudeSettings
impl PartialEq for ClaudeSettings
Source§impl Serialize for ClaudeSettings
impl Serialize for ClaudeSettings
impl StructuralPartialEq for ClaudeSettings
Auto Trait Implementations§
impl Freeze for ClaudeSettings
impl RefUnwindSafe for ClaudeSettings
impl Send for ClaudeSettings
impl Sync for ClaudeSettings
impl Unpin for ClaudeSettings
impl UnwindSafe for ClaudeSettings
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