pub struct AppConfig {
pub backend_type: String,
pub verbose: bool,
pub pass: PassBackendConfig,
pub tpm: TpmBackendConfig,
pub local: LocalBackendConfig,
pub security: SecurityConfig,
}Expand description
Main application configuration Note: Cannot derive Clone/Debug because it has #[clap_serde] fields
Fields§
§backend_type: StringStorage backend type: pass, tpm (experimental), or local (for testing)
verbose: boolEnable verbose logging
pass: PassBackendConfigPass backend configuration
tpm: TpmBackendConfigTPM backend configuration
local: LocalBackendConfigLocal backend configuration
security: SecurityConfigSecurity hardening configuration
Implementations§
Source§impl AppConfig
impl AppConfig
Sourcepub fn field_docs() -> &'static [(&'static str, &'static str)]
pub fn field_docs() -> &'static [(&'static str, &'static str)]
Get documentation for all fields Returns an array of (field_name, documentation) tuples
Sourcepub fn struct_doc() -> &'static str
pub fn struct_doc() -> &'static str
Get struct-level documentation
Sourcepub fn to_toml_fields(&self) -> Vec<(&'static str, String)>
pub fn to_toml_fields(&self) -> Vec<(&'static str, String)>
Get field values as TOML-formatted strings
Source§impl AppConfig
impl AppConfig
Sourcepub fn to_toml_with_comments(&self) -> String
pub fn to_toml_with_comments(&self) -> String
Generate TOML configuration with comments extracted from doc comments
Source§impl AppConfig
impl AppConfig
Sourcepub fn load(args: &mut Args) -> Self
pub fn load(args: &mut Args) -> Self
Load configuration with precedence: CLI > config file > defaults
Sourcepub fn backend(&self) -> Result<BackendConfig>
pub fn backend(&self) -> Result<BackendConfig>
Get the backend configuration based on the backend_type
Sourcepub fn apply_security_hardening(&self) -> Result<(), Box<dyn Error>>
pub fn apply_security_hardening(&self) -> Result<(), Box<dyn Error>>
Apply security hardening measures
Sourcepub fn security_config(&self) -> SecurityConfig
pub fn security_config(&self) -> SecurityConfig
Get security configuration
Trait Implementations§
Source§impl ClapSerde for AppConfig
impl ClapSerde for AppConfig
Source§impl<'de> Deserialize<'de> for AppConfig
impl<'de> Deserialize<'de> for AppConfig
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 AppConfig
impl RefUnwindSafe for AppConfig
impl Send for AppConfig
impl Sync for AppConfig
impl Unpin for AppConfig
impl UnwindSafe for AppConfig
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more