pub struct MessagePayload {
pub timestamp: RtmpTimestamp,
pub type_id: u8,
pub message_stream_id: u32,
pub data: Bytes,
}
Represents a raw RTMP message
Creates a new message payload with default values.
This is mostly used when all information about a message is not known at creation time
but instead is built up over time (e.g. RTMP chunk deserialization process).
Deserializes the message data in the specified payload into its corresponding
RtmpMessage
.
Note that flash clients (like Wowza's test client) lie and mark amf0 data and commands as
amf3 values. It is unknown why this happens, but any Amf3 command/data messages that are
seen are deserialized as amf0. So far this has not caused any issues.
This creates a MessagePayload
from an RtmpMessage
.
Since RTMP messages do not contain timestamp or the conversation stream id these must be
provided at the time of creation.
This method tests for self
and other
values to be equal, and is used by ==
. Read more
This method tests for !=
.
Formats the value using the given formatter. Read more
🔬 This is a nightly-only experimental API. (try_from
)
The type returned in the event of a conversion error.
🔬 This is a nightly-only experimental API. (try_from
)
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
🔬 This is a nightly-only experimental API. (try_from
)
The type returned in the event of a conversion error.
🔬 This is a nightly-only experimental API. (try_from
)
🔬 This is a nightly-only experimental API. (get_type_id
)
this method will likely be replaced by an associated static