pub struct RemoteEntry<'a> {
pub album_id: Uuid,
pub manifest_cbor: &'a [u8],
pub metadata_blob: &'a [u8],
pub original_ciphertext: &'a [u8],
pub local_chain_head: Option<Hash32>,
}Expand description
One remote feed entry, exactly as a sync feed delivers it: opaque bytes plus the album the entry claims and the head the receiving catalog already holds. Borrowed rather than owned so a caller hands over buffers it already has without a copy.
Fields§
§album_id: UuidThe album the feed says this entry belongs to. Cross-checked against the manifest by
verify_asset itself
([RejectReason::WrongAlbum]), never trusted on its own.
manifest_cbor: &'a [u8]The signed AssetManifest as opaque canonical CBOR, carried verbatim.
metadata_blob: &'a [u8]The sealed metadata blob the manifest commits to via metadata_blob_hash.
original_ciphertext: &'a [u8]The asset’s original ciphertext — required for the chokepoint’s content-integrity step.
local_chain_head: Option<Hash32>The provenance head the receiving catalog holds for this asset, or None if it has
never seen it. Passed straight through to
verify_asset’s parameter of the same name,
which is what decides replay ([RejectReason::Replayed]) and fork
([RejectReason::ForgedChain]).
It is a caller parameter rather than something read off the workspace because the
catalog that tracks synced assets is the client’s, not this workspace’s asset map — an
iOS gallery, a CLI report, and a peering reconciler each hold their own head. Feed back
RemoteAssetFacts::provenance_head after applying.
Implementations§
Source§impl<'a> RemoteEntry<'a>
impl<'a> RemoteEntry<'a>
Sourcepub fn head(&self) -> RemoteHead<'a>
pub fn head(&self) -> RemoteHead<'a>
This entry with its original named by the SHA-256 of
original_ciphertext — a digest these bytes back, so the
head is no weaker.
Trait Implementations§
Source§impl<'a> Clone for RemoteEntry<'a>
impl<'a> Clone for RemoteEntry<'a>
Source§fn clone(&self) -> RemoteEntry<'a>
fn clone(&self) -> RemoteEntry<'a>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl<'a> Copy for RemoteEntry<'a>
Auto Trait Implementations§
impl<'a> Freeze for RemoteEntry<'a>
impl<'a> RefUnwindSafe for RemoteEntry<'a>
impl<'a> Send for RemoteEntry<'a>
impl<'a> Sync for RemoteEntry<'a>
impl<'a> Unpin for RemoteEntry<'a>
impl<'a> UnsafeUnpin for RemoteEntry<'a>
impl<'a> UnwindSafe for RemoteEntry<'a>
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