pub struct ToriiConfig {
pub user: UserConfig,
pub snapshot: SnapshotConfig,
pub mirror: MirrorConfig,
pub git: GitConfig,
pub ui: UiConfig,
pub auth: AuthConfig,
pub update: UpdateConfig,
pub worktree: WorktreeConfig,
}Expand description
Global Torii configuration
Fields§
§user: UserConfigUser settings
snapshot: SnapshotConfigSnapshot settings
mirror: MirrorConfigMirror settings
git: GitConfigGit settings
ui: UiConfigUI settings
auth: AuthConfigPlatform auth tokens
update: UpdateConfigUpdate notifier settings
worktree: WorktreeConfigWorktree settings
Implementations§
Source§impl ToriiConfig
impl ToriiConfig
Sourcepub fn load_global() -> Result<Self>
pub fn load_global() -> Result<Self>
Load global configuration
Sourcepub fn load_local<P: AsRef<Path>>(repo_path: P) -> Result<Self>
pub fn load_local<P: AsRef<Path>>(repo_path: P) -> Result<Self>
Load local repository configuration (merged with global)
Sourcepub fn save_global(&self) -> Result<()>
pub fn save_global(&self) -> Result<()>
Save global configuration
Sourcepub fn save_local<P: AsRef<Path>>(&self, repo_path: P) -> Result<()>
pub fn save_local<P: AsRef<Path>>(&self, repo_path: P) -> Result<()>
Save local repository configuration
Sourcepub fn get(&self, key: &str) -> Option<String>
pub fn get(&self, key: &str) -> Option<String>
Get a configuration value by key path (e.g., “user.name”, “snapshot.auto_enabled”)
Trait Implementations§
Source§impl Clone for ToriiConfig
impl Clone for ToriiConfig
Source§fn clone(&self) -> ToriiConfig
fn clone(&self) -> ToriiConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ToriiConfig
impl Debug for ToriiConfig
Source§impl Default for ToriiConfig
impl Default for ToriiConfig
Source§impl<'de> Deserialize<'de> for ToriiConfig
impl<'de> Deserialize<'de> for ToriiConfig
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 ToriiConfig
impl RefUnwindSafe for ToriiConfig
impl Send for ToriiConfig
impl Sync for ToriiConfig
impl Unpin for ToriiConfig
impl UnsafeUnpin for ToriiConfig
impl UnwindSafe for ToriiConfig
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