pub struct SyncOperation {Show 13 fields
pub protocol_version: u16,
pub schema_version: u16,
pub operation_id: String,
pub record_id: String,
pub kind: String,
pub content_hash: String,
pub lamport: u64,
pub parent_op_id: Option<String>,
pub actor_did: String,
pub sensitivity: String,
pub payload_summary: String,
pub committed_unix: u32,
pub signature: Option<String>,
}Expand description
A single versioned, content-addressed sync operation (the wire DTO).
Fields§
§protocol_version: u16§schema_version: u16§operation_id: StringStable operation identifier — the dedup/idempotency anchor.
record_id: String§kind: String§content_hash: StringSHA-256 (hex) of payload_summary — integrity check on receipt.
lamport: u64Lamport clock for causal ordering across nodes.
parent_op_id: Option<String>§actor_did: String§sensitivity: StringRouting lane: “Public” | “Restricted” | “Classified”.
payload_summary: StringApproved projection / journal summary carried inline (no sensitive plaintext for Sanctuary).
committed_unix: u32§signature: Option<String>Detached signature (hex) over SyncOperation::signing_payload. Presence is required
(fail-closed); cryptographic verification is performed by the identity layer.
Implementations§
Source§impl SyncOperation
impl SyncOperation
Sourcepub fn new(
operation_id: impl Into<String>,
record_id: impl Into<String>,
kind: impl Into<String>,
actor_did: impl Into<String>,
sensitivity: impl Into<String>,
payload_summary: impl Into<String>,
lamport: u64,
committed_unix: u32,
) -> Self
pub fn new( operation_id: impl Into<String>, record_id: impl Into<String>, kind: impl Into<String>, actor_did: impl Into<String>, sensitivity: impl Into<String>, payload_summary: impl Into<String>, lamport: u64, committed_unix: u32, ) -> Self
Build a well-formed, content-hashed operation (signature filled in by the host layer).
Sourcepub fn signing_payload(&self) -> Vec<u8> ⓘ
pub fn signing_payload(&self) -> Vec<u8> ⓘ
The bytes a signature must cover: id + record + content hash (binds identity to content).
pub fn with_signature(self, signature_hex: impl Into<String>) -> Self
Trait Implementations§
Source§impl Clone for SyncOperation
impl Clone for SyncOperation
Source§fn clone(&self) -> SyncOperation
fn clone(&self) -> SyncOperation
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SyncOperation
impl Debug for SyncOperation
Source§impl<'de> Deserialize<'de> for SyncOperation
impl<'de> Deserialize<'de> for SyncOperation
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>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for SyncOperation
impl PartialEq for SyncOperation
Source§fn eq(&self, other: &SyncOperation) -> bool
fn eq(&self, other: &SyncOperation) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for SyncOperation
impl Serialize for SyncOperation
impl Eq for SyncOperation
impl StructuralPartialEq for SyncOperation
Auto Trait Implementations§
impl Freeze for SyncOperation
impl RefUnwindSafe for SyncOperation
impl Send for SyncOperation
impl Sync for SyncOperation
impl Unpin for SyncOperation
impl UnsafeUnpin for SyncOperation
impl UnwindSafe for SyncOperation
Blanket Implementations§
§impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
Aggregate shares in an MPC protocol.
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
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
Checks if this value is equivalent to the given key. Read more
§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
Compare self to
key and return true if they are equal.§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
Checks if this value is equivalent to the given key. Read more
§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
Checks if this value is equivalent to the given key. Read more
§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>
Converts
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>
Converts
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