pub struct DatagramObject {
pub datagram_type: DatagramType,
pub track_alias: VarInt,
pub group_id: VarInt,
pub object_id: VarInt,
pub publisher_priority: u8,
pub extension_headers: Vec<u8>,
pub status: Option<ObjectStatus>,
pub payload: Vec<u8>,
}Expand description
Datagram carrying a single object (§10.3.1, Figure 31).
Fields§
§datagram_type: DatagramTypeDatagram type byte.
track_alias: VarIntTrack alias.
group_id: VarIntGroup ID.
object_id: VarIntObject ID. Defaults to 0 when
DatagramType::object_id_present is false.
publisher_priority: u8Publisher priority.
extension_headers: Vec<u8>Raw extension-header bytes (empty unless
DatagramType::extensions_present is true).
status: Option<ObjectStatus>Object status (only present for status-type datagrams).
payload: Vec<u8>Object payload (empty for status-type datagrams).
Implementations§
Source§impl DatagramObject
impl DatagramObject
Sourcepub fn decode(buf: &mut impl Buf) -> Result<Self, CodecError>
pub fn decode(buf: &mut impl Buf) -> Result<Self, CodecError>
Decode a datagram. The buffer must contain the full datagram — payload-bearing types extend to the end of the QUIC datagram, which the caller is responsible for delimiting.
Trait Implementations§
Source§impl Clone for DatagramObject
impl Clone for DatagramObject
Source§fn clone(&self) -> DatagramObject
fn clone(&self) -> DatagramObject
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 DatagramObject
impl Debug for DatagramObject
Source§impl PartialEq for DatagramObject
impl PartialEq for DatagramObject
impl Eq for DatagramObject
impl StructuralPartialEq for DatagramObject
Auto Trait Implementations§
impl Freeze for DatagramObject
impl RefUnwindSafe for DatagramObject
impl Send for DatagramObject
impl Sync for DatagramObject
impl Unpin for DatagramObject
impl UnsafeUnpin for DatagramObject
impl UnwindSafe for DatagramObject
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