pub struct AlbumRoster {
pub album_id: Uuid,
pub roster_version: u64,
pub amk_epoch: AmkVersion,
pub attested_by_user: Uuid,
pub attested_by_device: Uuid,
pub attested_at: String,
pub members: Vec<RosterMember>,
}Expand description
The signed-over content of a roster attestation. Every field is covered by the attesting
device’s DSK hybrid signature in the enclosing SignedAlbumRoster.
Fields§
§album_id: UuidThe album this roster is for.
roster_version: u64Strictly monotonic per album. A server refuses a version at or below the one it holds unless the bytes are identical (a replay), so a roster can neither be rolled back nor silently replaced.
A server also bounds it above, by a small step over the version it holds: the field is an ordering, not a count, and a version nothing could ever exceed would freeze the album’s membership permanently. A client that is refused for it re-signs the same document one above the version the refusal names.
amk_epoch: AmkVersionThe AMK epoch the group is at after the commit this roster reflects. Non-decreasing across versions; the server records the epoch at which a member was granted and the one at which they vanished.
attested_by_user: UuidThe album owner’s account. The server anchors on this account’s published device directory, and refuses a roster whose owner is not the album’s.
attested_by_device: UuidThe owner-account device whose DSK signed this roster. Must be present and not revoked in the owner’s directory.
attested_at: StringRFC 3339 time the client produced the roster. Audit-only: the server orders by
roster_version, never by this.
members: Vec<RosterMember>Everyone other than the owner who may read the album, and what they may do. Absence at a higher version is removal.
Implementations§
Source§impl AlbumRoster
impl AlbumRoster
Sourcepub fn signing_bytes(&self) -> Result<Vec<u8>, MembershipError>
pub fn signing_bytes(&self) -> Result<Vec<u8>, MembershipError>
The canonical-CBOR signing bytes the attesting device’s DSK covers.
§Errors
Returns MembershipError::Encode if the roster cannot be canonically encoded.
Trait Implementations§
Source§impl Clone for AlbumRoster
impl Clone for AlbumRoster
Source§fn clone(&self) -> AlbumRoster
fn clone(&self) -> AlbumRoster
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for AlbumRoster
impl Debug for AlbumRoster
Source§impl<'de> Deserialize<'de> for AlbumRoster
impl<'de> Deserialize<'de> for AlbumRoster
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 AlbumRoster
Source§impl PartialEq for AlbumRoster
impl PartialEq for AlbumRoster
Source§fn eq(&self, other: &AlbumRoster) -> bool
fn eq(&self, other: &AlbumRoster) -> bool
self and other values to be equal, and is used by ==.Source§impl Serialize for AlbumRoster
impl Serialize for AlbumRoster
impl StructuralPartialEq for AlbumRoster
Auto Trait Implementations§
impl Freeze for AlbumRoster
impl RefUnwindSafe for AlbumRoster
impl Send for AlbumRoster
impl Sync for AlbumRoster
impl Unpin for AlbumRoster
impl UnsafeUnpin for AlbumRoster
impl UnwindSafe for AlbumRoster
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