pub struct OtPacket {
pub spooky_version: u32,
pub version: u32,
pub ops: Vec<OtRuneTransformOp>,
pub crc32: u32,
pub committed: Option<Timestamp>,
pub nonce: u32,
}
Fields§
§spooky_version: u32
so here’s the deal. Once uppon a time spookyVersion
was version
and things
worked okay. Then one day someone came along and decided our handling of
version 0 was all kinds of messed up. Sending a version that already existed
never transformed the packet by that particular version. It was as if
version
was treated as version + 1
. This could not stand and thus the
great rift of versions was created. version
does the right thing and
spookyVersion
maintains backwards compatibility.
version: u32
§ops: Vec<OtRuneTransformOp>
§crc32: u32
§committed: Option<Timestamp>
§nonce: u32
Trait Implementations§
Source§impl Message for OtPacket
impl Message for OtPacket
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Returns the encoded length of the message without a length delimiter.
Source§fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>
fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>
Encodes the message to a buffer. Read more
Source§fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>
fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>
Encodes the message with a length-delimiter to a buffer. Read more
Source§fn decode<B>(buf: B) -> Result<Self, DecodeError>
fn decode<B>(buf: B) -> Result<Self, DecodeError>
Decodes an instance of the message from a buffer. Read more
Source§fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>
fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>
Decodes a length-delimited instance of the message from the buffer.
Source§fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>
fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>
Decodes an instance of the message from a buffer, and merges it into
self
. Read moreSource§fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>
fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>
Decodes a length-delimited instance of the message from buffer, and
merges it into
self
.impl StructuralPartialEq for OtPacket
Auto Trait Implementations§
impl Freeze for OtPacket
impl RefUnwindSafe for OtPacket
impl Send for OtPacket
impl Sync for OtPacket
impl Unpin for OtPacket
impl UnwindSafe for OtPacket
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