pub struct ObjectHeader {
pub object_id: VarInt,
pub extension_headers_length: VarInt,
pub extensions: Vec<u8>,
pub payload_length: VarInt,
pub object_status: ObjectStatus,
}Expand description
Object within a subgroup stream (draft-11).
Fields§
§object_id: VarIntObject identifier within the subgroup.
extension_headers_length: VarIntTotal byte length of extension headers (0 if no extensions).
extensions: Vec<u8>Raw extension bytes (opaque).
payload_length: VarIntLength of the object payload in bytes.
object_status: ObjectStatusObject status (Normal unless payload_length == 0).
Implementations§
Source§impl ObjectHeader
impl ObjectHeader
Sourcepub fn encode(&self, buf: &mut impl BufMut)
pub fn encode(&self, buf: &mut impl BufMut)
Encode the object header (no extensions).
For extension-aware encoding, use Self::encode_with_extensions.
Sourcepub fn encode_with_extensions(
&self,
has_extensions: bool,
buf: &mut impl BufMut,
)
pub fn encode_with_extensions( &self, has_extensions: bool, buf: &mut impl BufMut, )
Encode the object header with extensions control.
Sourcepub fn decode(buf: &mut impl Buf) -> Result<Self, CodecError>
pub fn decode(buf: &mut impl Buf) -> Result<Self, CodecError>
Decode an object header (no extensions).
For extension-aware decoding, use Self::decode_with_extensions.
Sourcepub fn decode_with_extensions(
has_extensions: bool,
buf: &mut impl Buf,
) -> Result<Self, CodecError>
pub fn decode_with_extensions( has_extensions: bool, buf: &mut impl Buf, ) -> Result<Self, CodecError>
Decode an object header with extensions control.
Trait Implementations§
Source§impl Clone for ObjectHeader
impl Clone for ObjectHeader
Source§fn clone(&self) -> ObjectHeader
fn clone(&self) -> ObjectHeader
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 moreSource§impl Debug for ObjectHeader
impl Debug for ObjectHeader
Source§impl PartialEq for ObjectHeader
impl PartialEq for ObjectHeader
impl Eq for ObjectHeader
impl StructuralPartialEq for ObjectHeader
Auto Trait Implementations§
impl Freeze for ObjectHeader
impl RefUnwindSafe for ObjectHeader
impl Send for ObjectHeader
impl Sync for ObjectHeader
impl Unpin for ObjectHeader
impl UnsafeUnpin for ObjectHeader
impl UnwindSafe for ObjectHeader
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