pub struct TimelineOperationEnvelope {
pub schema_version: u16,
pub kind: TimelineOperationKind,
pub labels: Vec<TimelineLabel>,
pub body: TimelineOperationBodyV1,
}Expand description
A v1 timeline operation envelope.
Fields§
§schema_version: u16§kind: TimelineOperationKind§labels: Vec<TimelineLabel>§body: TimelineOperationBodyV1Implementations§
Source§impl TimelineOperationEnvelope
impl TimelineOperationEnvelope
Sourcepub fn new(body: TimelineOperationBodyV1, labels: Vec<TimelineLabel>) -> Self
pub fn new(body: TimelineOperationBodyV1, labels: Vec<TimelineLabel>) -> Self
Build a v1 envelope for a body.
Sourcepub fn encode(&self) -> Result<Vec<u8>, TimelineCodecError>
pub fn encode(&self) -> Result<Vec<u8>, TimelineCodecError>
Encode the envelope as canonical msgpack bytes.
Sourcepub fn decode(bytes: &[u8]) -> Result<Self, TimelineCodecError>
pub fn decode(bytes: &[u8]) -> Result<Self, TimelineCodecError>
Decode canonical msgpack bytes into an envelope.
Sourcepub fn operation_id(&self) -> Result<TimelineOperationId, TimelineCodecError>
pub fn operation_id(&self) -> Result<TimelineOperationId, TimelineCodecError>
Compute this envelope’s content-addressed operation id.
Trait Implementations§
Source§impl Clone for TimelineOperationEnvelope
impl Clone for TimelineOperationEnvelope
Source§fn clone(&self) -> TimelineOperationEnvelope
fn clone(&self) -> TimelineOperationEnvelope
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 TimelineOperationEnvelope
impl Debug for TimelineOperationEnvelope
impl Eq for TimelineOperationEnvelope
Source§impl PartialEq for TimelineOperationEnvelope
impl PartialEq for TimelineOperationEnvelope
Source§fn eq(&self, other: &TimelineOperationEnvelope) -> bool
fn eq(&self, other: &TimelineOperationEnvelope) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for TimelineOperationEnvelope
Auto Trait Implementations§
impl Freeze for TimelineOperationEnvelope
impl RefUnwindSafe for TimelineOperationEnvelope
impl Send for TimelineOperationEnvelope
impl Sync for TimelineOperationEnvelope
impl Unpin for TimelineOperationEnvelope
impl UnsafeUnpin for TimelineOperationEnvelope
impl UnwindSafe for TimelineOperationEnvelope
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