pub enum RtmpMessage {
Unknown {
type_id: u8,
data: Bytes,
},
Abort {
stream_id: u32,
},
Acknowledgement {
sequence_number: u32,
},
Amf0Command {
command_name: String,
transaction_id: f64,
command_object: Amf0Value,
additional_arguments: Vec<Amf0Value>,
},
Amf0Data {
values: Vec<Amf0Value>,
},
AudioData {
data: Bytes,
},
SetChunkSize {
size: u32,
},
SetPeerBandwidth {
size: u32,
limit_type: PeerBandwidthLimitType,
},
UserControl {
event_type: UserControlEventType,
stream_id: Option<u32>,
buffer_length: Option<u32>,
timestamp: Option<RtmpTimestamp>,
},
VideoData {
data: Bytes,
},
WindowAcknowledgement {
size: u32,
},
}
An enumeration of all types of RTMP messages that are supported
This type of message is used when an RTMP message is encountered with a type id that
we do not know about
Fields of Unknown
Notifies the peer that if it is waiting for chunks to complete a message that it should
discard the chunks it has already received.
Fields of Abort
An acknowledgement sent to confirm how many bytes that has been received since the prevoius
acknowledgement.
Fields of Acknowledgement
Amf0Command
A command being sent, encoded with amf0 values
Fields of Amf0Command
A message containing an array of data encoded as amf0 values
Fields of Amf0Data
A message containing audio data
Fields of AudioData
Tells the peer that the maximum chunk size for RTMP chunks it will be sending is changing
to the specified size.
Fields of SetChunkSize
SetPeerBandwidth
Indicates that the peer should limit its output bandwidth
Fields of SetPeerBandwidth
Notifies the peer of an event, such as a stream being
created or telling the peer how much of a buffer it should have.
Fields of UserControl
A message containing video data
Fields of VideoData
Notifies the peer how many bytes should be received before sending an Acknowledgement
message
Fields of WindowAcknowledgement
This method tests for self
and other
values to be equal, and is used by ==
. Read more
This method tests for !=
.
Performs copy-assignment from source
. Read more
Formats the value using the given formatter. Read more
Creates owned data from borrowed data, usually by cloning. Read more
🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. 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