pub struct BackupAsset {
pub album_id: Uuid,
pub asset_id: Uuid,
pub ciphertext: Arc<dyn CiphertextSource>,
pub metadata_blob: Vec<u8>,
pub create_metadata_blob: Vec<u8>,
pub provenance: Vec<ProvenanceRecord>,
pub receipts: Vec<u8>,
pub attestations: Vec<u8>,
}Expand description
One asset to back up: its ciphertext, metadata blob, and full provenance chain.
Fields§
§album_id: UuidAlbum the asset belongs to.
asset_id: UuidThe asset id.
ciphertext: Arc<dyn CiphertextSource>The STREAM ciphertext blob, as a source the export streams from. Its bytes must hash to
the head manifest’s ciphertext_hash: the MANIFEST commits to that address before the
body is written, and an export whose source yields anything else fails.
metadata_blob: Vec<u8>Encrypted metadata blob (wire format).
create_metadata_blob: Vec<u8>The sealed metadata blob the chain’s create binds, when a later edit replaced it as
metadata_blob (empty = none: the create binds the current blob,
or no blob). An upload carries the create, and only these exact bytes answer its
metadata_blob_hash, so a library that has not uploaded the asset yet needs them back.
Rides the create-meta/{asset_id} entry, additive within format 2.
provenance: Vec<ProvenanceRecord>The asset’s provenance chain (oldest first).
receipts: Vec<u8>The asset’s custody-receipt log ({uuid}.receipts.cbor bytes; empty = none). Evidence,
not a cache — a server destroying the record of its own liability is the adversary — so
it rides the artifact verbatim.
attestations: Vec<u8>The asset’s signed storage-attestation log ({uuid}.attestations.cbor bytes; empty =
none). Evidence for the same reason as receipts — a signed attestation is how a client
later proves the server reported a blob lost — so it rides the artifact verbatim.
Trait Implementations§
Source§impl Clone for BackupAsset
impl Clone for BackupAsset
Source§fn clone(&self) -> BackupAsset
fn clone(&self) -> BackupAsset
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl !RefUnwindSafe for BackupAsset
impl !UnwindSafe for BackupAsset
impl Freeze for BackupAsset
impl Send for BackupAsset
impl Sync for BackupAsset
impl Unpin for BackupAsset
impl UnsafeUnpin for BackupAsset
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more