[][src]Struct ubiquity::archive::ArchiveFile

pub struct ArchiveFile { /* fields omitted */ }

Abstracts over operations on a single archive file. Remember each 'file' in the archive represents an entire directory (not recursive) in the replicas.

Methods

impl ArchiveFile[src]

pub fn remove_all(&mut self) -> Result<(), Error>[src]

Remove all entries from this file. This just slightly more efficient than writing an empty Vec.

pub fn read<N: NumRoots>(&mut self) -> Result<ArchiveEntries<N>, ReadError>[src]

Reads the archive entries into a Vec This may acquire (or wait for) a lock, ensuring that multiple threads/processes aren't reading/writing to/from the same archive file.

pub fn write<N: NumRoots>(
    &mut self,
    entries: &mut ArchiveEntries<N>
) -> Result<(), WriteError>
[src]

Writes entries to disk

Trait Implementations

impl Display for ArchiveFile[src]

impl Drop for ArchiveFile[src]

Auto Trait Implementations

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> 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> ToString for T where
    T: Display + ?Sized
[src]

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.