pub struct MirrorManager { /* private fields */ }Implementations§
Source§impl MirrorManager
impl MirrorManager
pub fn new(rootfs: impl AsRef<Path>) -> Result<Self, MirrorError>
pub fn set(&mut self, mirror_names: &[&str]) -> Result<(), MirrorError>
pub fn add(&mut self, mirror_name: &str) -> Result<bool, MirrorError>
pub fn remove(&mut self, mirror_name: &str) -> Result<bool, MirrorError>
pub fn mirrors_iter( &self, ) -> Result<impl Iterator<Item = (&str, &MirrorConfig)>, MirrorError>
pub fn enabled_mirrors(&self) -> &IndexMap<Box<str>, Box<str>>
pub fn set_order(&mut self, order: &[usize])
pub fn write_status( &self, custom_mirror_tips: Option<&str>, ) -> Result<(), MirrorError>
Auto Trait Implementations§
impl !Freeze for MirrorManager
impl RefUnwindSafe for MirrorManager
impl Send for MirrorManager
impl Sync for MirrorManager
impl Unpin 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