pub struct EncoderV1 { /* private fields */ }Implementations
Trait Implementations
sourceimpl Encoder for EncoderV1
impl Encoder for EncoderV1
sourcefn to_vec(self) -> Vec<u8>
fn to_vec(self) -> Vec<u8>
Consume current encoder and return a binary with all data encoded so far.
sourcefn reset_ds_cur_val(&mut self)
fn reset_ds_cur_val(&mut self)
Reset the state of currently encoded DeleteSet.
sourcefn write_ds_clock(&mut self, clock: u32)
fn write_ds_clock(&mut self, clock: u32)
Write a clock value of currently encoded DeleteSet client.
sourcefn 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.
sourcefn 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.
sourcefn 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.
sourcefn write_client(&mut self, client: ClientID)
fn write_client(&mut self, client: ClientID)
Write currently encoded client identifier.
sourcefn 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. Read more
sourcefn 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.
sourcefn 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.
sourcefn 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. Read more
sourcefn 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. Read more
sourceimpl Write for EncoderV1
impl Write for EncoderV1
fn write_all(&mut self, buf: &[u8])
fn write_u8(&mut self, value: u8)
sourcefn 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)
sourcefn 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
sourcefn write_buf<B>(&mut self, buf: B) where
B: AsRef<[u8]>,
fn write_buf<B>(&mut self, buf: B) where
B: AsRef<[u8]>,
Write variable length buffer (binary content).
sourcefn write_string(&mut self, str: &str)
fn write_string(&mut self, str: &str)
Write variable-length utf8 string
Auto Trait Implementations
impl RefUnwindSafe for EncoderV1
impl Send for EncoderV1
impl Sync for EncoderV1
impl Unpin for EncoderV1
impl UnwindSafe for EncoderV1
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more