pub struct EncoderV1 { /* private fields */ }Implementations§
Trait Implementations§
Source§impl Encoder for EncoderV1
impl Encoder for EncoderV1
Source§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.
Source§fn reset_ds_cur_val(&mut self)
fn reset_ds_cur_val(&mut self)
Reset the state of currently encoded DeleteSet.
Source§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.
Source§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.
Source§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.
Source§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.
Source§fn write_client(&mut self, client: ClientID)
fn write_client(&mut self, client: ClientID)
Write currently encoded client identifier.
Source§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.
Source§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.
Source§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.
Source§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.
Source§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.
Source§impl Write for EncoderV1
impl Write for EncoderV1
fn write_all(&mut self, buf: &[u8])
fn write_u8(&mut self, value: u8)
Source§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)
Source§fn write_var<T: VarInt>(&mut self, num: T)
fn write_var<T: VarInt>(&mut self, num: T)
Write a variable length integer or unsigned integer. Read more
Source§fn write_var_signed<T: SignedVarInt>(&mut self, num: &Signed<T>)
fn write_var_signed<T: SignedVarInt>(&mut self, num: &Signed<T>)
Write a variable length integer or unsigned integer. Read more
Source§fn write_buf<B: AsRef<[u8]>>(&mut self, buf: B)
fn write_buf<B: AsRef<[u8]>>(&mut self, buf: B)
Write variable length buffer (binary content).
Source§fn write_string(&mut self, str: &str)
fn write_string(&mut self, str: &str)
Write variable-length utf8 string
Auto Trait Implementations§
impl Freeze for EncoderV1
impl RefUnwindSafe for EncoderV1
impl Send for EncoderV1
impl Sync for EncoderV1
impl Unpin for EncoderV1
impl UnwindSafe for EncoderV1
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