pub struct AlbumKeys {
pub album_id: Uuid,
pub name: String,
pub amks: BTreeMap<u32, [u8; 32]>,
pub write_tier: Option<HybridSigningKey>,
pub admin: Option<HybridSigningKey>,
pub current_epoch: u32,
}Expand description
One album’s key material across one or more epochs.
Capsule separates secrecy from authorization: the per-epoch amks are the content
keys (read access), while write_tier / admin are signing capabilities. A backup artifact
escrows only the former, so an album restored into a library that never held it arrives with
its content keys and no capabilities — see AlbumStore.
That state is modelled honestly here rather than papered over by minting fresh signing keys
that attest nothing and no peer trusts.
Fields§
§album_id: UuidAlbum id.
name: StringDisplay name.
amks: BTreeMap<u32, [u8; 32]>AMKs by epoch.
write_tier: Option<HybridSigningKey>Per-album write-tier signing key; None for a read-only recovered album.
admin: Option<HybridSigningKey>Per-album admin signing key (the epoch-ledger root); None for a read-only recovered
album.
current_epoch: u32The current (highest) epoch — the one new imports are written under.
Implementations§
Source§impl AlbumKeys
impl AlbumKeys
Sourcepub fn write_tier_signer(&self) -> Result<&HybridSigningKey, LifecycleError>
pub fn write_tier_signer(&self) -> Result<&HybridSigningKey, LifecycleError>
The write-tier signing key every asset manifest in this album is signed under, or
LifecycleError::AlbumReadOnly if this album carries no write capability.
Sourcepub fn admin_signer(&self) -> Result<&HybridSigningKey, LifecycleError>
pub fn admin_signer(&self) -> Result<&HybridSigningKey, LifecycleError>
The admin signing key that roots the epoch ledger, or LifecycleError::AlbumReadOnly.
Auto Trait Implementations§
impl Freeze for AlbumKeys
impl RefUnwindSafe for AlbumKeys
impl Send for AlbumKeys
impl Sync for AlbumKeys
impl Unpin for AlbumKeys
impl UnsafeUnpin for AlbumKeys
impl UnwindSafe for AlbumKeys
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
§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