pub struct ClaudeSettings {
pub provider: Option<ProviderConfig>,
pub model: Option<ModelConfig>,
pub endpoint: Option<EndpointConfig>,
pub http: Option<HTTPConfig>,
pub permissions: Option<Permissions>,
pub hooks: Option<Hooks>,
pub status_line: Option<StatusLine>,
pub environment: Option<HashMap<String, String>>,
}Expand description
Main Claude Code settings structure
Fields§
§provider: Option<ProviderConfig>Provider configuration
model: Option<ModelConfig>Model settings
endpoint: Option<EndpointConfig>API endpoint configuration
http: Option<HTTPConfig>HTTP client settings
permissions: Option<Permissions>Permissions configuration
hooks: Option<Hooks>Hook configurations
status_line: Option<StatusLine>Status line configuration
environment: Option<HashMap<String, String>>Environment variables captured at snapshot time
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§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