pub struct SubgroupObjectReader {
extensions_present: bool,
prev_object_id: Option<u64>,
}Expand description
Stateful reader/writer for draft-15 subgroup objects.
Carries the running delta state for object IDs and remembers whether extension headers are present on this stream.
Fields§
§extensions_present: bool§prev_object_id: Option<u64>Implementations§
Source§impl SubgroupObjectReader
impl SubgroupObjectReader
Sourcepub fn new(header: &SubgroupHeader) -> Self
pub fn new(header: &SubgroupHeader) -> Self
Build a reader seeded from the enclosing subgroup header.
Sourcepub fn read_object(
&mut self,
buf: &mut impl Buf,
) -> Result<SubgroupObject, CodecError>
pub fn read_object( &mut self, buf: &mut impl Buf, ) -> Result<SubgroupObject, CodecError>
Decode the next object from buf.
Sourcepub fn write_object(
&mut self,
object: &SubgroupObject,
buf: &mut impl BufMut,
) -> Result<(), CodecError>
pub fn write_object( &mut self, object: &SubgroupObject, buf: &mut impl BufMut, ) -> Result<(), CodecError>
Serialize an object, producing the correct delta encoding.
Trait Implementations§
Source§impl Clone for SubgroupObjectReader
impl Clone for SubgroupObjectReader
Source§fn clone(&self) -> SubgroupObjectReader
fn clone(&self) -> SubgroupObjectReader
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for SubgroupObjectReader
impl RefUnwindSafe for SubgroupObjectReader
impl Send for SubgroupObjectReader
impl Sync for SubgroupObjectReader
impl Unpin for SubgroupObjectReader
impl UnsafeUnpin for SubgroupObjectReader
impl UnwindSafe for SubgroupObjectReader
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