Struct EncoderV2
pub struct EncoderV2 { /* private fields */ }Implementations§
Trait Implementations§
§impl Encoder for EncoderV2
impl Encoder for EncoderV2
§fn to_vec(self) -> Vec<u8> ⓘ
fn to_vec(self) -> Vec<u8> ⓘ
Consume current encoder and return a binary with all data encoded so far.
§fn reset_ds_cur_val(&mut self)
fn reset_ds_cur_val(&mut self)
Reset the state of currently encoded DeleteSet.
§fn write_ds_clock(&mut self, clock: u32)
fn write_ds_clock(&mut self, clock: u32)
Write a clock value of currently encoded DeleteSet client.
§fn write_ds_len(&mut self, len: u32)
fn write_ds_len(&mut self, len: u32)
Write a number of client entries used by currently encoded DeleteSet.
§fn write_left_id(&mut self, id: &ID)
fn write_left_id(&mut self, id: &ID)
Write unique identifier of a currently encoded [Block]’s left origin.
§fn write_right_id(&mut self, id: &ID)
fn write_right_id(&mut self, id: &ID)
Write unique identifier of a currently encoded [Block]’s right origin.
§fn write_client(&mut self, client: u64)
fn write_client(&mut self, client: u64)
Write currently encoded client identifier.
§fn write_info(&mut self, info: u8)
fn write_info(&mut self, info: u8)
Write currently encoded [Block]’s info flags. These contain information about which fields
have been provided and which should be skipped during decoding process as well as a type of
block currently encoded.
§fn write_parent_info(&mut self, is_y_key: bool)
fn write_parent_info(&mut self, is_y_key: bool)
Write info flag about currently encoded [Block]’s parent. Is is another block or root type.
§fn write_type_ref(&mut self, info: u8)
fn write_type_ref(&mut self, info: u8)
Writes type ref data of currently encoded [Block]’s parent.
§fn write_any(&mut self, any: &Any)
fn write_any(&mut self, any: &Any)
Encode JSON-like data type. This is a complex structure which is an extension to JavaScript
Object Notation with some extra cases.
§fn write_json(&mut self, any: &Any)
fn write_json(&mut self, any: &Any)
Encode JSON-like data type as nested JSON string. This is a complex structure which is an
extension to JavaScript Object Notation with some extra cases.
§impl Write for EncoderV2
impl Write for EncoderV2
fn write_all(&mut self, buf: &[u8])
fn write_u8(&mut self, value: u8)
§fn write_string(&mut self, str: &str)
fn write_string(&mut self, str: &str)
Write variable-length utf8 string
§fn write_u32_be(&mut self, num: u32)
fn write_u32_be(&mut self, num: u32)
Write an unsigned integer (32bit) in big endian order (most significant byte first)
§fn write_var<T>(&mut self, num: T)where
T: VarInt,
fn write_var<T>(&mut self, num: T)where
T: VarInt,
Write a variable length integer or unsigned integer. Read more
§fn write_var_signed<T>(&mut self, num: &Signed<T>)where
T: SignedVarInt,
fn write_var_signed<T>(&mut self, num: &Signed<T>)where
T: SignedVarInt,
Write a variable length integer or unsigned integer. Read more
Auto Trait Implementations§
impl Freeze for EncoderV2
impl RefUnwindSafe for EncoderV2
impl Send for EncoderV2
impl Sync for EncoderV2
impl Unpin for EncoderV2
impl UnwindSafe for EncoderV2
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
§impl<T> CompatExt for T
impl<T> CompatExt for T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more