[][src]Struct asuran::repository::backend::multifile::manifest::InternalManifest

struct InternalManifest {
    known_entries: HashMap<ManifestID, ManifestTransaction>,
    verified_memo_pad: HashSet<ManifestID>,
    heads: Vec<ManifestID>,
    file: LockedFile,
    key: Key,
    chunk_settings: ChunkSettings,
    path: PathBuf,


known_entries: HashMap<ManifestID, ManifestTransaction>verified_memo_pad: HashSet<ManifestID>heads: Vec<ManifestID>file: LockedFilekey: Keychunk_settings: ChunkSettingspath: PathBuf


impl InternalManifest[src]

fn open(
    repository_path: impl AsRef<Path>,
    key: &Key,
    settings: Option<ChunkSettings>
) -> Result<InternalManifest>

Internal function for opening the manifest

The manifest this creates is not thread safe, see Manifest for the threadsafe implementation on top of this

Optionally sets the chunk settings.

Will return error if this is a new repository and the chunk settings are not set

fn build_heads(&mut self)[src]

Gets the heads from a list of transactions

fn verify_tx(&mut self, id: ManifestID) -> bool[src]

Recursivly verifies a transaction and all its parents

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

Returns the last modification timestamp of the manifest

Defaults to now if there are no heads

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

Returns the default chunk settings in this manifest

fn archive_iterator(&self) -> IntoIter<StoredArchive>[src]

Returns an iterator over the archives in this repository

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

Sets the chunk settings

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

Adds an archive to the manifest

Trait Implementations

impl Debug for InternalManifest[src]

Auto Trait Implementations

impl RefUnwindSafe for InternalManifest

impl Send for InternalManifest

impl Sync for InternalManifest

impl Unpin for InternalManifest

impl UnwindSafe for InternalManifest

Blanket Implementations

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

impl<T> Borrow<T> for T where
    T: ?Sized

impl<T> BorrowMut<T> for T where
    T: ?Sized

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

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 

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

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

impl<T> WithSubscriber for T[src]