pub struct CollaborationOperationEnvelope {
pub metadata: Option<CollaborationMetadata>,
pub discussion_id: DiscussionRecordId,
pub parents: Vec<CollabOpId>,
pub idempotency_key: CollaborationIdempotencyKey,
pub author: Attribution,
pub occurred_at_ms: i64,
pub body: CollaborationOperationBodyV1,
}Fields§
§metadata: Option<CollaborationMetadata>§discussion_id: DiscussionRecordId§parents: Vec<CollabOpId>§idempotency_key: CollaborationIdempotencyKey§occurred_at_ms: i64§body: CollaborationOperationBodyV1Implementations§
Source§impl CollaborationOperationEnvelope
impl CollaborationOperationEnvelope
pub fn new( discussion_id: DiscussionRecordId, parents: Vec<CollabOpId>, idempotency_key: CollaborationIdempotencyKey, author: Attribution, occurred_at_ms: i64, body: CollaborationOperationBodyV1, ) -> Result<Self, CollaborationCodecError>
Sourcepub fn with_metadata(
self,
metadata: CollaborationMetadata,
) -> Result<Self, CollaborationCodecError>
pub fn with_metadata( self, metadata: CollaborationMetadata, ) -> Result<Self, CollaborationCodecError>
Attach durable identity and references before signing the canonical record.
pub fn encode(&self) -> Result<Vec<u8>, CollaborationCodecError>
pub fn decode( bytes: &[u8], ) -> Result<DecodedCollaborationOperation, CollaborationCodecError>
Trait Implementations§
Source§impl<'de> Deserialize<'de> for CollaborationOperationEnvelope
impl<'de> Deserialize<'de> for CollaborationOperationEnvelope
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 CollaborationOperationEnvelope
impl StructuralPartialEq for CollaborationOperationEnvelope
Auto Trait Implementations§
impl Freeze for CollaborationOperationEnvelope
impl RefUnwindSafe for CollaborationOperationEnvelope
impl Send for CollaborationOperationEnvelope
impl Sync for CollaborationOperationEnvelope
impl Unpin for CollaborationOperationEnvelope
impl UnsafeUnpin for CollaborationOperationEnvelope
impl UnwindSafe for CollaborationOperationEnvelope
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