pub struct BackupSet { /* private fields */ }
Expand description

Information about the files which make a backup snapshot.

This struct contains paths for the manifest and volumes, and the backup format.

Implementations§

source§

impl BackupSet

source

pub fn is_complete(&self) -> bool

Returns whether the set is complete.

The corresponding backup has not been stopped before completion.

source

pub fn is_partial(&self) -> bool

Returns whether the set is partial.

This could happen when a backup is stopped before the completion.

source

pub fn start_time(&self) -> Timespec

Returns the creation time of the parent set.

The parent set depends on the type of this set. If it is incremental, the parent set is the previous one. If it is full, there is no parent set, so the time returned is the creation time for this set. Otherwise the creation time of this set is returned. This time, combined with end_time represent the time span handled by this set.

source

pub fn end_time(&self) -> Timespec

Returns the creation time of this set.

If this set is a full backup, this time is the same as the start time. This time, combined with start_time represent the time span handled by this set.

source

pub fn is_compressed(&self) -> bool

Returns whether the set is compressed.

source

pub fn is_encrypted(&self) -> bool

Returns whether the set is encrypted.

source

pub fn manifest_path(&self) -> &str

Returns the path of the manifest file for the set.

source

pub fn volume_path(&self, volume_num: i32) -> Option<&str>

Returns the path of the given volume.

source

pub fn num_volumes(&self) -> usize

Returns the number of volumes in the set.

source

pub fn is_full(&self) -> bool

Returns whether the set is a full backup.

source

pub fn is_incremental(&self) -> bool

Returns whether the set is a full backup.

source

pub fn is_same_set(&self, pr: &Info) -> bool

Returns whether the given file belongs to the same backup set, by looking at timestamps.

Trait Implementations§

source§

impl Debug for BackupSet

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Display for BackupSet

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more

Auto Trait Implementations§

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> ToString for Twhere T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
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.