Struct ruplicity::Snapshot

source ·
pub struct Snapshot<'a> { /* private fields */ }
Expand description

A snapshot in a backup.

Implementations§

source§

impl<'a> Snapshot<'a>

source

pub fn time(&self) -> Timespec

Returns the time in which the snapshot has been taken.

source

pub fn is_full(&self) -> bool

Returns whether the snapshot is a full backup.

A full snapshot does not depend on previous snapshots.

source

pub fn is_incremental(&self) -> bool

Returns whether the snapshot is an incremental backup.

An incremental snapshot depends on all the previous incremental snapshots and the first previous full snapshot. This set of dependent snapshots is called “chain”.

source

pub fn num_volumes(&self) -> usize

Returns the number of volumes contained in the snapshot.

source

pub fn as_backup_set(&self) -> &BackupSet

Returns the low level representation of the snapshot.

source

pub fn entries(&self) -> Result<SnapshotEntries<'_>>

Returns the files and directories present in the snapshot.

Be aware that using this functionality means that all the signature files in the current backup chain must be loaded, and this could take some time, depending on the file access provided by the backend and the signatures size.

Auto Trait Implementations§

§

impl<'a> !RefUnwindSafe for Snapshot<'a>

§

impl<'a> !Send for Snapshot<'a>

§

impl<'a> !Sync for Snapshot<'a>

§

impl<'a> Unpin for Snapshot<'a>

§

impl<'a> !UnwindSafe for Snapshot<'a>

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.