pub struct CsmConfig {
pub providers: Vec<ProviderConfig>,
pub default_provider: Option<ProviderType>,
pub auto_discover: bool,
}Expand description
Global CSM configuration including all providers
Fields§
§providers: Vec<ProviderConfig>Configured providers
default_provider: Option<ProviderType>Default provider for new sessions
auto_discover: boolWhether to auto-discover providers
Implementations§
Source§impl CsmConfig
impl CsmConfig
Sourcepub fn config_path() -> Result<PathBuf>
pub fn config_path() -> Result<PathBuf>
Get the configuration file path
Sourcepub fn get_provider(
&self,
provider_type: ProviderType,
) -> Option<&ProviderConfig>
pub fn get_provider( &self, provider_type: ProviderType, ) -> Option<&ProviderConfig>
Get a provider config by type
Sourcepub fn set_provider(&mut self, config: ProviderConfig)
pub fn set_provider(&mut self, config: ProviderConfig)
Add or update a provider config
Trait Implementations§
Source§impl<'de> Deserialize<'de> for CsmConfig
impl<'de> Deserialize<'de> for CsmConfig
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 CsmConfig
impl RefUnwindSafe for CsmConfig
impl Send for CsmConfig
impl Sync for CsmConfig
impl Unpin for CsmConfig
impl UnwindSafe for CsmConfig
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more