[][src]Trait asuran::repository::backend::Manifest

pub trait Manifest: Send + Sync + Debug + 'static {
    type Iterator: Iterator<Item = StoredArchive> + 'static;
#[must_use]    fn last_modification<'life0, 'async_trait>(
        &'life0 mut self
    ) -> Pin<Box<dyn Future<Output = Result<DateTime<FixedOffset>>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
;
#[must_use] fn chunk_settings<'life0, 'async_trait>(
        &'life0 mut self
    ) -> Pin<Box<dyn Future<Output = ChunkSettings> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
;
#[must_use] fn archive_iterator<'life0, 'async_trait>(
        &'life0 mut self
    ) -> Pin<Box<dyn Future<Output = Self::Iterator> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
;
#[must_use] fn write_chunk_settings<'life0, 'async_trait>(
        &'life0 mut self,
        settings: ChunkSettings
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
;
#[must_use] fn write_archive<'life0, 'async_trait>(
        &'life0 mut self,
        archive: StoredArchive
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
;
#[must_use] fn touch<'life0, 'async_trait>(
        &'life0 mut self
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
; }

Manifest trait

Keeps track of which archives are in the repository.

All writing methods should commit to hard storage prior to returning

Associated Types

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

Loading content...

Required methods

#[must_use]fn last_modification<'life0, 'async_trait>(
    &'life0 mut self
) -> Pin<Box<dyn Future<Output = Result<DateTime<FixedOffset>>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    Self: 'async_trait, 

Timestamp of the last modification

#[must_use]fn chunk_settings<'life0, 'async_trait>(
    &'life0 mut self
) -> Pin<Box<dyn Future<Output = ChunkSettings> + Send + 'async_trait>> where
    'life0: 'async_trait,
    Self: 'async_trait, 

Returns the default settings for new chunks in this repository

#[must_use]fn archive_iterator<'life0, 'async_trait>(
    &'life0 mut self
) -> Pin<Box<dyn Future<Output = Self::Iterator> + Send + 'async_trait>> where
    'life0: 'async_trait,
    Self: 'async_trait, 

Returns an iterator over the list of archives in this repository, in reverse chronological order (newest first).

#[must_use]fn write_chunk_settings<'life0, 'async_trait>(
    &'life0 mut self,
    settings: ChunkSettings
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    Self: 'async_trait, 

Sets the chunk settings in the repository

#[must_use]fn write_archive<'life0, 'async_trait>(
    &'life0 mut self,
    archive: StoredArchive
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    Self: 'async_trait, 

Adds an archive to the manifest

#[must_use]fn touch<'life0, 'async_trait>(
    &'life0 mut self
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    Self: 'async_trait, 

Updates the timestamp without performing any other operations

Loading content...

Implementors

impl Manifest for Manifest[src]

type Iterator = IntoIter<StoredArchive>

impl Manifest for ManifestObject[src]

type Iterator = Box<dyn Iterator<Item = StoredArchive> + 'static>

impl<B: SyncBackend> Manifest for BackendHandle<B>[src]

type Iterator = <<B as SyncBackend>::SyncManifest as SyncManifest>::Iterator

impl<T: Manifest> Manifest for ManifestWrapper<T>[src]

type Iterator = Box<dyn Iterator<Item = StoredArchive> + 'static>

Loading content...