pub struct Payload {
pub operations: Vec<Operation>,
pub sealed: BTreeMap<StatementId, Envelope>,
pub restated: BTreeMap<ChangeId, Restated>,
}Expand description
The content of a change, which the change’s header does not hold.
In CBOR, a payload is the array [operations, sealed, restated], where restated is
an array of [change, operations, sealed], in ascending order of the changes’ IDs.
docs/spec/log.md describes the format.
Fields§
§operations: Vec<Operation>The operations that everyone with the space key can read.
sealed: BTreeMap<StatementId, Envelope>Secret statements, by ID, each encrypted with its record key. What they supersede
is retracted in operations, so that every replica applies it.
restated: BTreeMap<ChangeId, Restated>What the change states again of earlier changes, by the change each came from: the rest of the changes it purges.
Implementations§
Source§impl Payload
impl Payload
Sourcepub fn all_operations(&self) -> impl Iterator<Item = &Operation>
pub fn all_operations(&self) -> impl Iterator<Item = &Operation>
Every operation of the payload, its own and those it states again.
Sourcepub fn all_sealed(&self) -> impl Iterator<Item = (&StatementId, &Envelope)>
pub fn all_sealed(&self) -> impl Iterator<Item = (&StatementId, &Envelope)>
Every statement the payload seals, its own and those it states again.
Trait Implementations§
impl Eq for Payload
impl StructuralPartialEq for Payload
Auto Trait Implementations§
impl Forget for Payload
impl Freeze for Payload
impl Move for Payload
impl RefUnwindSafe for Payload
impl Send for Payload
impl Sync for Payload
impl Unpin for Payload
impl UnsafeUnpin for Payload
impl UnwindSafe for Payload
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
Mutably borrows from an owned value. Read more