pub struct Object {
pub groups: Vec<Group>,
}Expand description
A versioned group/frame table followed by concatenated payload bytes.
Fields§
§groups: Vec<Group>Groups in strictly ascending sequence order.
Implementations§
Source§impl Object
impl Object
Sourcepub fn bounds(&self) -> Result<RangeInclusive<u64>>
pub fn bounds(&self) -> Result<RangeInclusive<u64>>
Inclusive group sequences from first to last.
Sourcepub fn encode(&self) -> Result<Bytes>
pub fn encode(&self) -> Result<Bytes>
Encode the binary envelope. The first sequence is absolute; later ones are current - previous - 1.
Sourcepub fn decode(buf: impl Buf) -> Result<Self>
pub fn decode(buf: impl Buf) -> Result<Self>
Decode a complete table before slicing any payload, and refuse an unknown version.
Sourcepub fn decode_groups(buf: impl Buf, range: RangeInclusive<u64>) -> Result<Self>
pub fn decode_groups(buf: impl Buf, range: RangeInclusive<u64>) -> Result<Self>
Decode and require the table’s sequences to match range.
Sourcepub fn check_bounds(&self, range: RangeInclusive<u64>) -> Result<()>
pub fn check_bounds(&self, range: RangeInclusive<u64>) -> Result<()>
Require this object’s sequences to match a range-named key.
Trait Implementations§
impl Eq for Object
impl StructuralPartialEq for Object
Auto Trait Implementations§
impl Freeze for Object
impl RefUnwindSafe for Object
impl Send for Object
impl Sync for Object
impl Unpin for Object
impl UnsafeUnpin for Object
impl UnwindSafe for Object
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