pub struct Backup<B> { /* private fields */ }
Expand description
A top level representation of a duplicity backup.
Implementations§
source§impl<B: Backend> Backup<B>
impl<B: Backend> Backup<B>
sourcepub fn new(backend: B) -> Result<Self>
pub fn new(backend: B) -> Result<Self>
Opens an existig backup by using the given backend.
Errors
This function will return an error whenever the backend returns an error in a file operation. If the backend can’t provide access to backup files, because they are unavailable or non-existing, an empty backup could be returned.
Examples
use ruplicity::Backup;
use ruplicity::backend::local::LocalBackend;
// use the local backend to open a path in the file system containing a backup
let backend = LocalBackend::new("tests/backups/single_vol");
let backup = Backup::new(backend).unwrap();
println!("Got backup with {} snapshots!", backup.snapshots().unwrap().count());
Trait Implementations§
Auto Trait Implementations§
impl<B> !RefUnwindSafe for Backup<B>
impl<B> Send for Backup<B>where B: Send,
impl<B> !Sync for Backup<B>
impl<B> Unpin for Backup<B>where B: Unpin,
impl<B> UnwindSafe for Backup<B>where B: UnwindSafe,
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