pub struct ValueStreamReader<'a, 'b> {
pub inner: &'a mut BufferReader<'b>,
}Expand description
Stream API for reading valuetype wire bytes (CDR §15.3.4).
Fields§
§inner: &'a mut BufferReader<'b>Inner reader.
Implementations§
Source§impl<'a, 'b> ValueStreamReader<'a, 'b>
impl<'a, 'b> ValueStreamReader<'a, 'b>
Sourcepub fn new(inner: &'a mut BufferReader<'b>) -> Self
pub fn new(inner: &'a mut BufferReader<'b>) -> Self
Constructor.
Sourcepub fn read_value_tag(&mut self) -> Result<Option<String>, DecodeError>
pub fn read_value_tag(&mut self) -> Result<Option<String>, DecodeError>
Reads a value-tag and returns the Repository ID.
Ok(None) for null-value (0x00000000 tag).
The return is Some(first_repo_id) — for multi-repo-id lists
the first ID is delivered; for the full list
roundtrip see Self::read_value_tag_full.
§Errors
Decode error (truncated, unknown tag type).
Sourcepub fn read_value_tag_full(&mut self) -> Result<ValueTagHeader, DecodeError>
pub fn read_value_tag_full(&mut self) -> Result<ValueTagHeader, DecodeError>
Reads a value-tag with full header information — single, multi-repo-id list, or chunked variant.
§Errors
Decode error or unknown wire tag.
Sourcepub fn read_chunk_size(&mut self) -> Result<i32, DecodeError>
pub fn read_chunk_size(&mut self) -> Result<i32, DecodeError>
Reads a chunk within a chunked-encoded value.
The return is the chunk size in bytes (positive) or a
negative end-tag (Spec §15.3.4.3 — -nesting_level marks
the end of the chunked value).
§Errors
Decode error.
Auto Trait Implementations§
impl<'a, 'b> !UnwindSafe for ValueStreamReader<'a, 'b>
impl<'a, 'b> Freeze for ValueStreamReader<'a, 'b>
impl<'a, 'b> RefUnwindSafe for ValueStreamReader<'a, 'b>
impl<'a, 'b> Send for ValueStreamReader<'a, 'b>
impl<'a, 'b> Sync for ValueStreamReader<'a, 'b>
impl<'a, 'b> Unpin for ValueStreamReader<'a, 'b>
impl<'a, 'b> UnsafeUnpin for ValueStreamReader<'a, 'b>
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