pub struct OperationEnvelope {
pub protocol_version: ProtocolVersion,
pub operation_id: OperationId,
pub tenant_id: TenantId,
pub actor_id: ActorId,
pub device_id: DeviceId,
pub entity: EntityRef,
pub base_version: Option<EntityVersion>,
pub created_at: HybridTimestamp,
pub schema_version: SchemaVersion,
pub operation_kind: OperationKind,
pub payload: Vec<u8>,
pub metadata: OperationMetadata,
}Expand description
A domain operation and the synchronization metadata needed to process it safely.
Fields§
§protocol_version: ProtocolVersionTransport protocol spoken by the producer.
operation_id: OperationIdPermanent key used to make retries idempotent.
tenant_id: TenantIdClaimed tenant; the server must compare it with authenticated context.
actor_id: ActorIdActor that originated the operation.
device_id: DeviceIdDevice that originated the operation.
entity: EntityRefAggregate root or entity targeted by the operation.
base_version: Option<EntityVersion>Authoritative version on which the local edit was based.
created_at: HybridTimestampCausal timestamp metadata, never used as a cursor or entity version.
schema_version: SchemaVersionApplication payload schema version.
operation_kind: OperationKindApplication-registered operation decoder/handler identifier.
payload: Vec<u8>Postcard-encoded application command. Raw SQL is never valid here.
metadata: OperationMetadataDependencies and non-sensitive diagnostic metadata.
Trait Implementations§
Source§impl Clone for OperationEnvelope
impl Clone for OperationEnvelope
Source§fn clone(&self) -> OperationEnvelope
fn clone(&self) -> OperationEnvelope
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 OperationEnvelope
impl Debug for OperationEnvelope
Source§impl<'de> Deserialize<'de> for OperationEnvelope
impl<'de> Deserialize<'de> for OperationEnvelope
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
impl Eq for OperationEnvelope
Source§impl PartialEq for OperationEnvelope
impl PartialEq for OperationEnvelope
Source§impl Serialize for OperationEnvelope
impl Serialize for OperationEnvelope
impl StructuralPartialEq for OperationEnvelope
Auto Trait Implementations§
impl Freeze for OperationEnvelope
impl RefUnwindSafe for OperationEnvelope
impl Send for OperationEnvelope
impl Sync for OperationEnvelope
impl Unpin for OperationEnvelope
impl UnsafeUnpin for OperationEnvelope
impl UnwindSafe for OperationEnvelope
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