pub struct DecoderV2<'a> { /* private fields */ }Expand description
Version 2 of lib0 decoder.
Implementations§
Trait Implementations§
Source§impl<'a> Decoder for DecoderV2<'a>
impl<'a> Decoder for DecoderV2<'a>
Source§fn reset_ds_cur_val(&mut self)
fn reset_ds_cur_val(&mut self)
Reset the value of current delete set state.
Source§fn read_ds_len(&mut self) -> Result<u32, Error>
fn read_ds_len(&mut self) -> Result<u32, Error>
Read the number of clients stored in encoded DeleteSet.
Source§fn read_left_id(&mut self) -> Result<ID, Error>
fn read_left_id(&mut self) -> Result<ID, Error>
Read left origin of a currently decoded [Block].
Source§fn read_right_id(&mut self) -> Result<ID, Error>
fn read_right_id(&mut self) -> Result<ID, Error>
Read right origin of a currently decoded [Block].
Source§fn read_info(&mut self) -> Result<u8, Error>
fn read_info(&mut self) -> Result<u8, Error>
Read info bit flags of a currently decoded [Block].
Source§fn read_parent_info(&mut self) -> Result<bool, Error>
fn read_parent_info(&mut self) -> Result<bool, Error>
Read bit flags determining type of parent of a currently decoded [Block].
Source§fn read_type_ref(&mut self) -> Result<u8, Error>
fn read_type_ref(&mut self) -> Result<u8, Error>
Read type ref info of a currently decoded [Block] parent.
Source§fn read_any(&mut self) -> Result<Any, Error>
fn read_any(&mut self) -> Result<Any, Error>
Decode a JSON-like data type. It’s a complex type which is an extension of native JavaScript
Object Notation.
Source§impl<'a> Read for DecoderV2<'a>
impl<'a> Read for DecoderV2<'a>
fn read_exact(&mut self, len: usize) -> Result<&[u8], Error>
Source§fn read_u32_be(&mut self) -> Result<u32, Error>
fn read_u32_be(&mut self) -> Result<u32, Error>
Read 4 bytes as unsigned integer in big endian order.
(most significant byte first)
Source§fn read_var<T>(&mut self) -> Result<T, Error>where
T: VarInt,
fn read_var<T>(&mut self) -> Result<T, Error>where
T: VarInt,
Read unsigned integer with variable length. Read more
Source§fn read_var_signed<T>(&mut self) -> Result<Signed<T>, Error>where
T: SignedVarInt,
fn read_var_signed<T>(&mut self) -> Result<Signed<T>, Error>where
T: SignedVarInt,
Read unsigned integer with variable length. Read more
Auto Trait Implementations§
impl<'a> Freeze for DecoderV2<'a>
impl<'a> RefUnwindSafe for DecoderV2<'a>
impl<'a> Send for DecoderV2<'a>
impl<'a> Sync for DecoderV2<'a>
impl<'a> Unpin for DecoderV2<'a>
impl<'a> UnwindSafe for DecoderV2<'a>
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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