pub struct ConfigHub { /* private fields */ }Implementations§
Source§impl ConfigHub
impl ConfigHub
pub fn global() -> Result<Self, ConfigError>
pub fn from_config_dir(dir: impl Into<PathBuf>) -> Self
pub fn config_dir(&self) -> &Path
pub fn config_toml_path(&self) -> PathBuf
pub fn validate_setting_mutation( &self, key: &str, value: &str, ) -> Result<(), ConfigError>
pub fn routes_at_path(&self) -> PathBuf
pub fn migrate_legacy_layout( &self, legacy_data_dir: &Path, ) -> Result<Option<MigrationReport>, ConfigError>
pub fn storage_config(&self, project_root: Option<&Path>) -> StorageConfig
pub fn load_routes_source(&self) -> Result<Option<String>, ConfigError>
pub fn append_dsl_route( &self, flow_name: &str, trigger: &str, ) -> Result<(), ConfigError>
pub fn mcp_json_path(&self) -> PathBuf
pub fn from_daemon_config_path(path: impl Into<PathBuf>) -> Self
pub fn with_daemon_config_path(self, path: impl Into<PathBuf>) -> Self
pub fn from_auth_path(path: impl Into<PathBuf>) -> Self
pub fn load_auth(&self) -> Result<AuthStore, ConfigError>
pub fn update_auth<T>( &self, mutate: impl FnOnce(&mut AuthStore) -> Result<T, ConfigError>, ) -> Result<T, ConfigError>
pub fn add_auth_provider( &self, provider: StoredProvider, ) -> Result<(), ConfigError>
pub fn remove_auth_provider(&self, id: &str) -> Result<bool, ConfigError>
pub fn set_auth_provider_enabled( &self, id: &str, enabled: bool, ) -> Result<bool, ConfigError>
pub fn update_auth_tokens( &self, id: &str, update: AuthTokenUpdate, ) -> Result<bool, ConfigError>
pub fn update_auth_model_cache( &self, id: &str, cache: ModelCache, ) -> Result<bool, ConfigError>
pub fn load_or_init_daemon_config(&self) -> Result<DaemonConfig, ConfigError>
pub fn rotate_daemon_config(&self) -> Result<DaemonConfig, ConfigError>
pub fn read_config_toml(&self) -> Result<String, ConfigError>
pub fn theme_preference(&self) -> Result<ThemePreference, ConfigError>
pub fn fs_access_mode(&self) -> Result<Option<FsAccessMode>, ConfigError>
pub fn auto_snapshot(&self) -> Result<Option<bool>, ConfigError>
pub fn compact_review_mode( &self, ) -> Result<Option<CompactReviewMode>, ConfigError>
pub fn suggest_model(&self) -> Result<Option<String>, ConfigError>
pub fn interjection_mode(&self) -> Result<Option<InterjectionMode>, ConfigError>
pub fn tool_output_budget(&self) -> Result<ToolOutputBudget, ConfigError>
pub fn web_fetch_config(&self) -> Result<WebConfig, ConfigError>
pub fn web_search_config(&self) -> Result<SearchConfig, ConfigError>
pub fn trust_config(&self) -> Result<TrustConfig, ConfigError>
pub fn preview_config(&self) -> Result<PreviewConfig, ConfigError>
pub fn sandbox_config(&self) -> Result<SandboxConfig, ConfigError>
pub fn redact_config(&self) -> Result<RedactConfig, ConfigError>
pub fn upsert_model( &self, update: ModelConfigUpdate<'_>, ) -> Result<(), ConfigError>
pub fn upsert_provider( &self, update: ProviderConfigUpdate<'_>, ) -> Result<(), ConfigError>
pub fn add_alias(&self, alias: &str, model: &str) -> Result<(), ConfigError>
pub fn bind_default_model(&self, model: &str) -> Result<(), ConfigError>
pub fn update_alias( &self, old_alias: Option<&str>, new_alias: &str, model: &str, ) -> Result<(), ConfigError>
pub fn remove_alias(&self, alias: &str) -> Result<(), ConfigError>
pub fn reload(&self) -> Result<(), ConfigError>
pub fn model_config(&self) -> Result<Option<ProviderConfig>, ConfigError>
pub fn load_mcp(&self) -> Vec<McpServerConfig>
pub fn load_local_mcp(&self) -> Vec<McpServerConfig>
pub fn save_mcp(&self, configs: &[McpServerConfig]) -> Result<(), ConfigError>
pub fn upsert_mcp(&self, config: McpServerConfig) -> Result<(), ConfigError>
pub fn toggle_mcp(&self, name: &str) -> Result<bool, ConfigError>
pub fn remove_mcp(&self, name: &str) -> Result<(), ConfigError>
pub fn migrate_and_reload_models( &self, ) -> Result<ModelMigrationOutcome, ConfigError>
pub fn migrate_model_config_if_needed( &self, ) -> Result<ModelMigrationOutcome, ConfigError>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ConfigHub
impl RefUnwindSafe for ConfigHub
impl Send for ConfigHub
impl Sync for ConfigHub
impl Unpin for ConfigHub
impl UnsafeUnpin for ConfigHub
impl UnwindSafe for ConfigHub
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.