pub enum StoreChange {
Show 21 variants
CreateStore {
store: StoreId,
name: String,
admin: MemberPublicKeys,
key: KeyId,
key_hash: [u8; 32],
device_name: String,
person: String,
circle: NewCircle,
circles: Vec<NewCircle>,
},
SetUpStorage {
access: MemberAccess,
},
RenameStore {
name: String,
},
AdmitMember {
member: MemberId,
keys: MemberPublicKeys,
role: MemberRole,
access: MemberAccess,
device: DeviceId,
device_name: String,
person: String,
circle: NewCircle,
},
RecoverMember {
member: MemberId,
expected: MemberPublicKeys,
keys: MemberPublicKeys,
access: Option<MemberAccess>,
device: DeviceId,
device_name: String,
circle: NewCircle,
},
SetAccess {
member: MemberId,
access: MemberAccess,
},
RemoveMember {
member: MemberId,
},
ChangeRole {
member: MemberId,
role: MemberRole,
},
AddDevice {
name: String,
replaces: Option<DeviceId>,
},
RemoveDevice {
device: DeviceId,
},
CreateCircle {
circle: CircleId,
name: String,
breaking_version: u32,
key: KeyId,
key_hash: [u8; 32],
},
RenameCircle {
circle: CircleId,
name: String,
},
DeleteCircle {
circle: CircleId,
},
AddCircleMember {
circle: CircleId,
member: MemberId,
},
RemoveCircleMember {
circle: CircleId,
member: MemberId,
key: KeyId,
key_hash: [u8; 32],
},
RotateKey {
audience: Audience,
key: KeyId,
key_hash: [u8; 32],
},
RaiseSchema {
version: u32,
announcement: Slot,
},
Reset {
announcement: Slot,
},
ReplaceMemberKeys {
member: MemberId,
expected: MemberPublicKeys,
keys: MemberPublicKeys,
},
AddInviteShare {
invite: InviteId,
account: String,
},
EndInviteShare {
invite: InviteId,
},
}Expand description
Every admin operation listed in §10, including store creation.
Variants§
CreateStore
Create a store, name its first admin and register the writing device.
The entry’s author is the first admin’s stable id; admin supplies
that member’s initial pair, which verifies this entry (D6). It records
no storage access: SetUpStorage does, once storage exists.
Fields
admin: MemberPublicKeysThe first admin’s initial public pair.
person: StringThe creator’s name, which every device of hers writes her profile
with, as an admission’s person is a joiner’s (§13.2).
SetUpStorage
Record how the store’s first admin reaches storage, which fixes the kind of access every member has and, for a provider account, the account that holds the store (§10.3). Applies once, as an admin in the preceding state; access entries, admissions and invite shares wait for it.
Fields
access: MemberAccessThe author’s provider account, or the public S3 key id they use.
RenameStore
Set the store name, as an admin in the preceding state (§10).
AdmitMember
Admit a joining person: add their stable id with both public keys, their initial role and access, and register the device their request names. Only an admission slot holds it, beside the member’s key copies (§13.2, D9).
Fields
keys: MemberPublicKeysThe member’s initial public pair.
role: MemberRoleThe initial role.
access: MemberAccessStorage access granted by the inviting owner.
RecoverMember
Recover an active member on a new device: rebind their pair, as replace-member-keys does, set their access when the invite carried a new S3 key, and register the device their request names. Only an admission slot holds it (§13.2, D9).
Fields
expected: MemberPublicKeysThe binding which must still be current before this slot.
keys: MemberPublicKeysThe member’s new public pair.
access: Option<MemberAccess>The member’s new storage access, as set-access records it: the
S3 key the recovery invite carries. None keeps their access.
SetAccess
Record a member’s current storage access, used by a later removal (§10): the author’s own, or an admin’s replacement S3 key for another member.
Fields
access: MemberAccessThe provider account, or the S3 key id and its principal; no credentials.
RemoveMember
Remove a member and delete circles left empty (§14.1).
ChangeRole
Set a member’s role.
AddDevice
Register the writing install for the entry’s author: an install registers only itself (§10.2).
Fields
RemoveDevice
Remove a device’s access.
CreateCircle
Make a circle with its creator as its first member.
Fields
RenameCircle
Rename a circle without changing its members, keys or rows.
DeleteCircle
Delete a circle (§15.9).
AddCircleMember
Add a store member to a circle (§15.5).
RemoveCircleMember
Remove a circle member, deleting the circle if left empty, and introduce the circle’s replacement key (§15.8).
Fields
RotateKey
Introduce a key without changing audience membership (§12.1).
Fields
RaiseSchema
Raise an audience’s app schema version with its replacement snapshot (§18.3).
Fields
Reset
Reset the store’s or a circle’s rows to a snapshot (§19.4).
ReplaceMemberKeys
Replace an active member’s public pair, keeping their id, role, access, circles and devices (§10). It carries no audience keys.
Fields
expected: MemberPublicKeysThe binding which must still be current before this slot.
keys: MemberPublicKeysThe member’s new public pair.
Record that the writing device’s invite shares the store with a provider account (§13.2, §14.2). Claimed before the grant, so the owner’s other devices know of the share and take it back once the invite ends or its device is gone for good.
End the share the writing device recorded for its invite (§13.2).
Implementations§
Source§impl StoreChange
impl StoreChange
Sourcepub fn made_circle(&self) -> Option<&CircleId>
pub fn made_circle(&self) -> Option<&CircleId>
The circle this change makes: a circle’s creation, or an admission making its member’s.
Sourcepub fn created_circles(&self) -> impl Iterator<Item = &NewCircle>
pub fn created_circles(&self) -> impl Iterator<Item = &NewCircle>
The circles a store’s creation makes, in the order slot 1 makes them: the creator’s private circle, then each circle her first write asks for. Every other change makes none of these.
Trait Implementations§
Source§impl Clone for StoreChange
impl Clone for StoreChange
Source§fn clone(&self) -> StoreChange
fn clone(&self) -> StoreChange
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 StoreChange
impl Debug for StoreChange
impl Eq for StoreChange
Source§impl PartialEq for StoreChange
impl PartialEq for StoreChange
impl StructuralPartialEq for StoreChange
Auto Trait Implementations§
impl Freeze for StoreChange
impl RefUnwindSafe for StoreChange
impl Send for StoreChange
impl Sync for StoreChange
impl Unpin for StoreChange
impl UnsafeUnpin for StoreChange
impl UnwindSafe for StoreChange
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<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
§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> ErasedDestructor for Twhere
T: 'static,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> 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