pub struct Archive {
pub itver: u16,
/* private fields */
}Fields§
§itver: u16Implementations§
Source§impl Archive
impl Archive
Sourcepub fn init(logger: impl Logger) -> Self
pub fn init(logger: impl Logger) -> Self
Initialises a new archive, will throw error if one already exists
Sourcepub fn load_dir(path: PathBuf, logger: impl Logger) -> Self
pub fn load_dir(path: PathBuf, logger: impl Logger) -> Self
Loads an archive at a specified path
Sourcepub fn backup(out_path: impl AsRef<Path>, logger: impl Logger)
pub fn backup(out_path: impl AsRef<Path>, logger: impl Logger)
Backs up home archive to specified path
Sourcepub fn load_backup(path: impl AsRef<Path>, force: bool, logger: impl Logger)
pub fn load_backup(path: impl AsRef<Path>, force: bool, logger: impl Logger)
Loads a backup if that backup is the same as the active archive and or newer than the active archive, otherwise errors will be thrown
Sourcepub fn wipe(self, logger: impl Logger)
pub fn wipe(self, logger: impl Logger)
Wipes the specified archive and asks the user for confirmation
pub fn commit(&self, config: impl AsRef<Path>, logger: impl Logger)
pub fn database(&self) -> &LazyDB
pub fn database_exists(&self, path: impl AsRef<Path>) -> bool
pub fn get_entry(&self, uid: String, logger: impl Logger) -> Option<Entry>
pub fn get_moc(&self, uid: String, logger: impl Logger) -> Option<MOC>
pub fn list_entries(&self, logger: impl Logger) -> Vec<Entry>
pub fn list_mocs(&self, logger: impl Logger) -> Vec<MOC>
Auto Trait Implementations§
impl Freeze for Archive
impl RefUnwindSafe for Archive
impl Send for Archive
impl Sync for Archive
impl Unpin for Archive
impl UnwindSafe for Archive
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