pub struct ValueReader { /* private fields */ }Expand description
Reads valuetype instances with indirection resolution (value sharing): an
indirection yields the same Rc instance as the referenced value_tag.
Implementations§
Source§impl ValueReader
impl ValueReader
Sourcepub fn read(
&mut self,
r: &mut BufferReader<'_>,
base: usize,
reg: &ValueRegistry,
) -> Result<Option<Rc<dyn Any>>, DecodeError>
pub fn read( &mut self, r: &mut BufferReader<'_>, base: usize, reg: &ValueRegistry, ) -> Result<Option<Rc<dyn Any>>, DecodeError>
Reads an optional valuetype. base = absolute stream offset of
reader byte 0 (for the indirection position arithmetic; top-level 0).
§Errors
Unknown RepositoryId, unresolvable/forward indirection, (yet) unsupported chunked encoding, CDR decode error.
Trait Implementations§
Source§impl Default for ValueReader
impl Default for ValueReader
Source§fn default() -> ValueReader
fn default() -> ValueReader
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !RefUnwindSafe for ValueReader
impl !Send for ValueReader
impl !Sync for ValueReader
impl !UnwindSafe for ValueReader
impl Freeze for ValueReader
impl Unpin for ValueReader
impl UnsafeUnpin for ValueReader
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