[][src]Struct ubiquity::archive::Archive

pub struct Archive {
    pub directory: PathBuf,
}

The Archive struct stores the state of the replicas after the last syncing operation. It is used to detect differences to replicas more quickly, and must be kept up to date after propagating changes.

Fields

directory: PathBuf

Methods

impl Archive[src]

pub fn new(directory: PathBuf) -> Result<Self, Error>[src]

Initializes a directory at the provided path and gets ready to start reading/writing archive data.

pub fn for_directory(&self, directory: &Path) -> ArchiveFile[src]

Constructs an ArchiveFile representing the entire directory in the replicas.

pub fn for_hashed_directory(&self, directory: HashedPath) -> ArchiveFile[src]

Constructs an ArchiveFile from a hashed directory, representing an entire directory in the replicas.

pub fn hash(path: &Path) -> HashedPath[src]

Trait Implementations

impl Debug for Archive[src]

impl<'de> Deserialize<'de> for Archive[src]

impl Serialize for Archive[src]

Auto Trait Implementations

impl RefUnwindSafe for Archive

impl Send for Archive

impl Sync for Archive

impl Unpin for Archive

impl UnwindSafe for Archive

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T[src]

type Output = T

Should always be Self

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.