pub enum Authority {
Reference(Box<ReferenceAuthority>),
OpenMls(Box<OpenMlsAuthority>),
}Expand description
A concrete album authority behind the AlbumAuthority seam, so a holder (e.g.
Workspace) can store either backend without naming a
concrete type. Reference is the offline/test default present on every build; OpenMls is
the live MLS backend, available only under the mls feature (host-only). The enum itself
implements AlbumAuthority, so &Authority coerces to &dyn AlbumAuthority at every
verify_asset call site.
Variants§
Reference(Box<ReferenceAuthority>)
The offline, admin-signed epoch-ledger authority.
OpenMls(Box<OpenMlsAuthority>)
The live OpenMLS-group authority (X-Wing suite 0x004D).
Implementations§
Source§impl Authority
impl Authority
Sourcepub fn as_reference(&self) -> Option<&ReferenceAuthority>
pub fn as_reference(&self) -> Option<&ReferenceAuthority>
The reference backend, if this is the offline/reference authority; None for the live
MLS backend. Used to capture the admin-signed epoch ledger for persistence.
Sourcepub fn as_reference_mut(&mut self) -> Option<&mut ReferenceAuthority>
pub fn as_reference_mut(&mut self) -> Option<&mut ReferenceAuthority>
The reference backend, mutably, if this is the offline/reference authority. Returns
None for the live MLS backend — whose epoch advances are self-update commits, not
ledger attestations, and so ride the MLS ceremonies rather than this path.
Trait Implementations§
Source§impl AlbumAuthority for Authority
impl AlbumAuthority for Authority
Source§fn epoch_ceiling(&self) -> AmkVersion
fn epoch_ceiling(&self) -> AmkVersion
amk_version the admin chain attests. A
manifest claiming a higher epoch is terminal-rejected (the server cannot fabricate
a future epoch a client will honor).Source§fn write_tier_pubkey(&self, epoch: AmkVersion) -> Option<HybridVerifyingKey>
fn write_tier_pubkey(&self, epoch: AmkVersion) -> Option<HybridVerifyingKey>
epoch, or None if the chain attests no such epoch.
verify_asset checks the manifest’s write_sig against this key.Source§fn has_amk(&self, epoch: AmkVersion) -> bool
fn has_amk(&self, epoch: AmkVersion) -> bool
epoch is held locally. When an epoch is within
the attested range but its AMK has not yet arrived over MLS, the asset is pending,
not forged.Source§fn admin_chain_verifies(&self) -> bool
fn admin_chain_verifies(&self) -> bool
verify_asset must terminal-reject everything — an
implementation must never trust an unsigned or forged ledger.Source§impl From<OpenMlsAuthority> for Authority
Available on crate feature mls only.
impl From<OpenMlsAuthority> for Authority
mls only.Source§fn from(a: OpenMlsAuthority) -> Self
fn from(a: OpenMlsAuthority) -> Self
Source§impl From<ReferenceAuthority> for Authority
impl From<ReferenceAuthority> for Authority
Source§fn from(a: ReferenceAuthority) -> Self
fn from(a: ReferenceAuthority) -> Self
Auto Trait Implementations§
impl Freeze for Authority
impl RefUnwindSafe for Authority
impl Send for Authority
impl Sync for Authority
impl Unpin for Authority
impl UnsafeUnpin for Authority
impl UnwindSafe for Authority
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