pub enum HistoryPolicy {
Full,
Capped(u32),
}Expand description
How much history a new joiner may decrypt, fixed per album at creation and read from the album’s MLS metadata on every add — never chosen per-add, so a member’s history visibility never depends on which device added them or in what order (SSoT: MLS § History Delivery). Changing it is an album upgrade ceremony, never an ad-hoc per-add decision.
Variants§
Full
Full history (the default for shared albums): the joiner receives every prior AMK
(AMK_v1..AMK_current) and can read every prior asset.
Capped(u32)
Capped history: the joiner receives only the most-recent n epochs’ AMKs. Older assets
remain visible but not decryptable (placeholders). n = 0 collapses to “current epoch
only”; a value ≥ the current epoch count is equivalent to Full.
Implementations§
Source§impl HistoryPolicy
impl HistoryPolicy
Sourcepub fn entitled_range(self, ceiling: u32) -> RangeInclusive<u32>
pub fn entitled_range(self, ceiling: u32) -> RangeInclusive<u32>
The inclusive amk_version range a joiner is entitled to when the album’s current epoch
(ceiling) is ceiling. Always includes the current epoch; the lower bound is 1 for
Full and ceiling - n + 1 (floored at 1) for Capped(n).
This is a pure function of (policy, ceiling) — the load-bearing property that makes a
joiner’s history independent of which admin device performs the add.
Trait Implementations§
Source§impl Clone for HistoryPolicy
impl Clone for HistoryPolicy
Source§fn clone(&self) -> HistoryPolicy
fn clone(&self) -> HistoryPolicy
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for HistoryPolicy
Source§impl Debug for HistoryPolicy
impl Debug for HistoryPolicy
Source§impl<'de> Deserialize<'de> for HistoryPolicy
impl<'de> Deserialize<'de> for HistoryPolicy
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for HistoryPolicy
Source§impl PartialEq for HistoryPolicy
impl PartialEq for HistoryPolicy
Source§fn eq(&self, other: &HistoryPolicy) -> bool
fn eq(&self, other: &HistoryPolicy) -> bool
self and other values to be equal, and is used by ==.Source§impl Serialize for HistoryPolicy
impl Serialize for HistoryPolicy
impl StructuralPartialEq for HistoryPolicy
Auto Trait Implementations§
impl Freeze for HistoryPolicy
impl RefUnwindSafe for HistoryPolicy
impl Send for HistoryPolicy
impl Sync for HistoryPolicy
impl Unpin for HistoryPolicy
impl UnsafeUnpin for HistoryPolicy
impl UnwindSafe for HistoryPolicy
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> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§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