pub struct BasicHeader {
pub fmt: Fmt,
pub chunk_stream_id: ChunkStreamId,
}Expand description
Chunk Basic Header (§5.3.1.1): 1 to 3 bytes encoding the 2-bit fmt and
the chunk stream id (csid). Length depends only on the csid value; the
implementation SHOULD (and this Serialize impl does) use the smallest
form that holds the id.
Fields§
§fmt: FmtSelects which of the 4 Chunk Message Header formats follows.
chunk_stream_id: ChunkStreamIdChunk stream id. Valid range 2..=65599 on the wire (0/1 are the 2-/3-byte form markers, not real ids; 2 is further reserved by the spec for low-level protocol control messages/commands but is still a structurally valid basic-header value).
Trait Implementations§
Source§impl Clone for BasicHeader
impl Clone for BasicHeader
impl Copy for BasicHeader
Source§impl Debug for BasicHeader
impl Debug for BasicHeader
impl Eq for BasicHeader
Source§impl<'a> Parse<'a> for BasicHeader
impl<'a> Parse<'a> for BasicHeader
Source§impl PartialEq for BasicHeader
impl PartialEq for BasicHeader
Source§impl Serialize for BasicHeader
impl Serialize for BasicHeader
Source§type Error = RtmpError
type Error = RtmpError
The error type this implementer returns (usually the same as the
corresponding
Parse impl, but need not be).Source§fn serialized_len(&self) -> usize
fn serialized_len(&self) -> usize
Number of bytes
serialize_into will write.Source§fn serialize_into(&self, buf: &mut [u8]) -> Result<usize, RtmpError>
fn serialize_into(&self, buf: &mut [u8]) -> Result<usize, RtmpError>
Write the serialised form into
buf. Returns the number of bytes
written (always equal to serialized_len()).Source§fn try_to_bytes(&self) -> Result<Vec<u8>, Self::Error>
fn try_to_bytes(&self) -> Result<Vec<u8>, Self::Error>
Allocate a
Vec and serialize into it, returning the serializer’s error instead of
panicking. This is the only
allocate-and-serialize entry point: there is deliberately no panicking
to_bytes (hand-built values, or values assembled from damaged wire data,
can violate a wire constraint, so the error must reach the caller).impl StructuralPartialEq for BasicHeader
Auto Trait Implementations§
impl Forget for BasicHeader
impl Freeze for BasicHeader
impl Move for BasicHeader
impl RefUnwindSafe for BasicHeader
impl Send for BasicHeader
impl Sync for BasicHeader
impl Unpin for BasicHeader
impl UnsafeUnpin for BasicHeader
impl UnwindSafe for BasicHeader
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