[][src]Trait asuran::repository::backend::common::sync_backend::SyncManifest

pub trait SyncManifest: Debug {
    type Iterator: Iterator<Item = StoredArchive> + Debug + Send + 'static;
    fn last_modification(&mut self) -> Result<DateTime<FixedOffset>>;
fn chunk_settings(&mut self) -> ChunkSettings;
fn archive_iterator(&mut self) -> Self::Iterator;
fn write_chunk_settings(&mut self, settings: ChunkSettings) -> Result<()>;
fn write_archive(&mut self, archive: StoredArchive) -> Result<()>;
fn touch(&mut self) -> Result<()>;
fn seen_versions(&mut self) -> HashSet<(Version, Uuid)>; }

Associated Types

type Iterator: Iterator<Item = StoredArchive> + Debug + Send + 'static

Loading content...

Required methods

fn last_modification(&mut self) -> Result<DateTime<FixedOffset>>

fn chunk_settings(&mut self) -> ChunkSettings

fn archive_iterator(&mut self) -> Self::Iterator

fn write_chunk_settings(&mut self, settings: ChunkSettings) -> Result<()>

fn write_archive(&mut self, archive: StoredArchive) -> Result<()>

fn touch(&mut self) -> Result<()>

fn seen_versions(&mut self) -> HashSet<(Version, Uuid)>

Loading content...

Implementors

impl SyncManifest for FlatFile[src]

impl SyncManifest for Mem[src]

impl SyncManifest for SFTPManifest[src]

impl<F: Read + Write + Seek + 'static> SyncManifest for GenericFlatFile<F>[src]

type Iterator = IntoIter<StoredArchive>

fn last_modification(&mut self) -> Result<DateTime<FixedOffset>>[src]

Assumes archives were written in chronological order, and returns the timestamp of the last archive written.

Errors

Will return Err if there are no archives in this repository

fn chunk_settings(&mut self) -> ChunkSettings[src]

Returns the cached ChunkSettings stored in the struct

fn write_chunk_settings(&mut self, settings: ChunkSettings) -> Result<()>[src]

Modifies the cached ChunkSettings, as well as the ones in the EntryFooterData. Additionally sets the dirty flag on the chunk settings, so if only the chunk settings were modified, this change will still get persisted to the repository.

fn archive_iterator(&mut self) -> Self::Iterator[src]

Clones the cached manifest Vec and turns it into an iterator

fn write_archive(&mut self, archive: StoredArchive) -> Result<()>[src]

Adds the archive to the cached manifest Vec, as well as to the EntryFooterData

fn touch(&mut self) -> Result<()>[src]

This repository type does not support touching, so this does nothing

Loading content...