[][src]Struct asuran::manifest::archive::StoredArchive

pub struct StoredArchive {
    pub name: String,
    pub id: ChunkID,
    pub timestamp: DateTime<FixedOffset>,
}

A 'heavy' pointer to a an Archive in a repository.

Contains the ChunkID of the chunk the Archive is serialized in, as well as its date of creation.

Currently also contains the name of the Archive, but adding this was a mistake as it leaks information that should not be leaked, so it will be removed soon.

Fields

name: String

The name of the archive

id: ChunkID

Pointer the the archive metadata in the repository

timestamp: DateTime<FixedOffset>

Time the archive was started it

Used to prevent replay attackts

Methods

impl StoredArchive[src]

pub async fn load<'_, '_>(
    &'_ self,
    repo: &'_ mut Repository<impl BackendClone>
) -> Result<ActiveArchive, ArchiveError>
[src]

Loads the archive metadata from the repository and unpacks it for use

pub fn timestamp(&self) -> DateTime<FixedOffset>[src]

Returns the timestamp of the archive

pub fn id(&self) -> ChunkID[src]

Returns the pointer to the archive

pub fn name(&self) -> &str[src]

Returns the name of the archive

Trait Implementations

impl Clone for StoredArchive[src]

impl Debug for StoredArchive[src]

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

impl Eq for StoredArchive[src]

impl From<ManifestTransaction> for StoredArchive[src]

impl Hash for StoredArchive[src]

impl PartialEq<StoredArchive> for StoredArchive[src]

impl Serialize for StoredArchive[src]

impl StructuralEq for StoredArchive[src]

impl StructuralPartialEq for StoredArchive[src]

Auto Trait Implementations

impl RefUnwindSafe for StoredArchive

impl Send for StoredArchive

impl Sync for StoredArchive

impl Unpin for StoredArchive

impl UnwindSafe for StoredArchive

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<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

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

impl<T> Instrument for T[src]

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

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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.

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

impl<T> WithSubscriber for T[src]