pub struct MirrorManager { /* private fields */ }Implementations§
Source§impl MirrorManager
impl MirrorManager
pub fn new<P: AsRef<Path>>(repo_path: P) -> Result<Self>
Sourcepub fn add_mirror(
&self,
platform: &str,
account_type: AccountType,
account_name: &str,
repo_name: &str,
protocol: Protocol,
is_primary: bool,
) -> Result<()>
pub fn add_mirror( &self, platform: &str, account_type: AccountType, account_name: &str, repo_name: &str, protocol: Protocol, is_primary: bool, ) -> Result<()>
Add a new mirror with simplified interface
Sourcepub fn set_primary(&self, platform: &str, account_name: &str) -> Result<()>
pub fn set_primary(&self, platform: &str, account_name: &str) -> Result<()>
Set a mirror as master
Sourcepub fn list_mirrors(&self) -> Result<()>
pub fn list_mirrors(&self) -> Result<()>
List all mirrors
Sourcepub fn sync_replicas_if_any(&self, force: bool) -> Result<()>
pub fn sync_replicas_if_any(&self, force: bool) -> Result<()>
Sync replicas silently if any are configured — called automatically by torii sync
Sourcepub fn sync_all(&self, force: bool) -> Result<()>
pub fn sync_all(&self, force: bool) -> Result<()>
Sync to all replica mirrors (push from master)
Sourcepub fn remove_mirror_by_account(
&self,
platform: &str,
account: &str,
) -> Result<()>
pub fn remove_mirror_by_account( &self, platform: &str, account: &str, ) -> Result<()>
Remove a mirror by platform and account
Sourcepub fn remove_mirror(&self, name: &str) -> Result<()>
pub fn remove_mirror(&self, name: &str) -> Result<()>
Remove a mirror by name (legacy)
Sourcepub fn configure_autofetch(
&self,
enable: bool,
interval: Option<u32>,
) -> Result<()>
pub fn configure_autofetch( &self, enable: bool, interval: Option<u32>, ) -> Result<()>
Configure autofetch settings
Sourcepub fn show_autofetch_status(&self) -> Result<()>
pub fn show_autofetch_status(&self) -> Result<()>
Show autofetch status
Auto Trait Implementations§
impl Freeze for MirrorManager
impl RefUnwindSafe for MirrorManager
impl Send for MirrorManager
impl Sync for MirrorManager
impl Unpin for MirrorManager
impl UnsafeUnpin for MirrorManager
impl UnwindSafe for MirrorManager
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