Skip to main content

MessageStreamKind

Enum MessageStreamKind 

Source
pub enum MessageStreamKind {
    Control,
    NetStream(u32),
    Reserved(u32),
}
Expand description

Typed classification of a message’s msg_stream_id per Message Formats spec §5 (“Protocol Control Messages MUST have message stream ID 0 (called as control stream)”) and §4.1 (3-byte stream ID field).

The numeric NetStream ids 1..=0x00FF_FFFF are the values a server returns from _result(createStream); per the RTMP Commands Messages spec §4.1.3 a freshly created NetStream receives “a stream ID” that the publisher then stamps into every subsequent A/V / metadata message header. The chunk message-stream-id field on the wire is 32-bit little-endian (RTMP Chunk Stream §6.1.2.1) but the §4.1 message header layout only allocates 3 bytes for it; values whose top byte is non-zero are reserved and surface here as MessageStreamKind::Reserved so a caller can refuse them.

Variants§

§

Control

msg_stream_id == 0 — the “control stream” carrying NetConnection commands (connect, createStream, _result, _error, call) and the protocol-control / user-control messages (types 1..=6).

§

NetStream(u32)

A NetStream handle (1..=0x00FF_FFFF) — the value returned by _result(createStream), stamped into every audio / video / data / aggregate message that flows on that NetStream.

§

Reserved(u32)

msg_stream_id has bit(s) set in the top byte, outside the §4.1 3-byte field. RTMP Chunk Stream §6.1.2.1 carries the field as a 32-bit value so receivers see it on the wire, but the Message Formats spec §4.1 reserves the high byte. Surfaced so a strict consumer can refuse the message.

Trait Implementations§

Source§

impl Clone for MessageStreamKind

Source§

fn clone(&self) -> MessageStreamKind

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for MessageStreamKind

Source§

impl Debug for MessageStreamKind

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Eq for MessageStreamKind

Source§

impl PartialEq for MessageStreamKind

Source§

fn eq(&self, other: &MessageStreamKind) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl StructuralPartialEq for MessageStreamKind

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.