pub struct ContextRevision {
pub version: u16,
pub id: Uuid,
pub parents: Vec<ContentHash>,
pub metadata: CollaborationMetadata,
pub anchor: CollaborationAnchor,
pub content: String,
pub tags: Vec<AnnotationTag>,
pub supersedes: Option<Uuid>,
pub extracted_from: Option<DiscussionRecordId>,
pub occurred_at_ms: i64,
pub provenance: Option<ContextProvenance>,
pub canonical_body: CanonicalBody,
}Fields§
§version: u16§id: Uuid§parents: Vec<ContentHash>Original outer operation IDs, never mutable observation versions.
metadata: CollaborationMetadata§anchor: CollaborationAnchor§content: String§supersedes: Option<Uuid>§extracted_from: Option<DiscussionRecordId>§occurred_at_ms: i64§provenance: Option<ContextProvenance>Absent only on native records authored before provenance was carried in the signed body. New local replication must always populate it.
canonical_body: CanonicalBodyCanonical MessagePack from the last successful Self::encode or Self::decode.
Not serialized. Struct literals use Default::default.
Implementations§
Source§impl ContextRevision
impl ContextRevision
pub fn encode(&self) -> Result<Vec<u8>, CollaborationCodecError>
pub fn decode(bytes: &[u8]) -> Result<ContextRevision, CollaborationCodecError>
pub fn id(&self) -> Result<ContentHash, CollaborationCodecError>
Trait Implementations§
Source§impl Clone for ContextRevision
impl Clone for ContextRevision
Source§fn clone(&self) -> ContextRevision
fn clone(&self) -> ContextRevision
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 ContextRevision
impl Debug for ContextRevision
Source§impl<'de> Deserialize<'de> for ContextRevision
impl<'de> Deserialize<'de> for ContextRevision
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<ContextRevision, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<ContextRevision, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for ContextRevision
Source§impl PartialEq for ContextRevision
impl PartialEq for ContextRevision
Source§impl Serialize for ContextRevision
impl Serialize for ContextRevision
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for ContextRevision
Auto Trait Implementations§
impl !Freeze for ContextRevision
impl RefUnwindSafe for ContextRevision
impl Send for ContextRevision
impl Sync for ContextRevision
impl Unpin for ContextRevision
impl UnsafeUnpin for ContextRevision
impl UnwindSafe for ContextRevision
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