#[non_exhaustive]pub enum RtmpError {
Show 22 variants
BufferTooShort(BufferTooShort),
#[non_exhaustive] Malformed {
what: &'static str,
},
#[non_exhaustive] ChunkSizeOutOfRange {
value: u32,
},
#[non_exhaustive] InvalidLimitType {
value: u8,
},
#[non_exhaustive] UnsupportedUserControlEvent {
value: u16,
},
#[non_exhaustive] UnsupportedAmf0Marker {
marker: u8,
},
#[non_exhaustive] Amf0DepthExceeded {
max: usize,
},
#[non_exhaustive] Amf0TooManyValues {
max: usize,
},
#[non_exhaustive] CommandTooLong {
len: usize,
max: usize,
},
#[non_exhaustive] Amf0StringTooLong {
len: usize,
},
#[non_exhaustive] CommandNameNotString {
value: Amf0Value,
},
#[non_exhaustive] CommandTransactionIdNotNumber {
value: Amf0Value,
},
#[non_exhaustive] HandshakeVersion {
value: u8,
expected: u8,
},
#[non_exhaustive] Amf0Utf8 {
what: &'static str,
},
#[non_exhaustive] TooManyChunkStreams {
max: usize,
},
#[non_exhaustive] InputBudgetExceeded {
max: usize,
},
#[non_exhaustive] ChunkStreamState {
chunk_stream_id: u32,
what: &'static str,
},
#[non_exhaustive] UnexpectedState {
what: &'static str,
},
#[non_exhaustive] InvalidChunkStreamId {
chunk_stream_id: u32,
},
FieldOverflow(FieldOverflow),
OutputBufferTooSmall(OutputBufferTooSmall),
Damage(DamageError),
}Expand description
Errors produced by the RTMP ingest session engine.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
BufferTooShort(BufferTooShort)
Not enough input bytes were available to parse a complete structure (handshake message, chunk header, or reassembled RTMP message).
#[non_exhaustive]Malformed
The input did not conform to the expected wire layout (bad handshake
version, invalid chunk fmt/CSID encoding, a length that overruns
its buffer, or similar).
Fields
This variant is marked as non-exhaustive
#[non_exhaustive]ChunkSizeOutOfRange
A Set Chunk Size announced a value this engine cannot adopt: zero, a
non-zero reserved top bit (§5.4.1), or above the caller’s ChunkLimits::max_chunk_size.
Fields
This variant is marked as non-exhaustive
#[non_exhaustive]InvalidLimitType
A Set Peer Bandwidth carried a limit type byte outside 0..=2
(§5.4.5).
Fields
This variant is marked as non-exhaustive
#[non_exhaustive]UnsupportedUserControlEvent
A User Control message carried an event type §6.7 does not define.
Fields
This variant is marked as non-exhaustive
#[non_exhaustive]UnsupportedAmf0Marker
An AMF0 value used a marker this engine does not decode ([AMF0]
§2.1’s reserved, legacy and AMF3-switch markers).
Fields
This variant is marked as non-exhaustive
#[non_exhaustive]Amf0DepthExceeded
AMF0 data nested containers deeper than the caller’s
Amf0Limits::max_depth.
Fields
This variant is marked as non-exhaustive
#[non_exhaustive]Amf0TooManyValues
AMF0 data held more values than the caller’s
Amf0Limits::max_values — a wide container
(millions of one-byte nulls, or three-byte empty-key pairs) would
otherwise expand into millions of Amf0Values from one message.
Fields
This variant is marked as non-exhaustive
#[non_exhaustive]CommandTooLong
A Command Message body was longer than the caller’s
ServerLimits::max_command_len.
Fields
This variant is marked as non-exhaustive
#[non_exhaustive]Amf0StringTooLong
An AMF0 String carried more than the 65535 bytes its 16-bit length prefix can hold; AMF0 has no Long String variant to fall back on inside these messages.
Fields
This variant is marked as non-exhaustive
#[non_exhaustive]CommandNameNotString
The first value of a Command Message body was not an AMF0 String (§7.1.1: the command name).
Fields
This variant is marked as non-exhaustive
#[non_exhaustive]CommandTransactionIdNotNumber
The second value of a Command Message body was not an AMF0 Number (§7.1.1: the transaction id).
Fields
This variant is marked as non-exhaustive
#[non_exhaustive]HandshakeVersion
The handshake version byte was not RTMP_VERSION
(§5.2.2).
Fields
This variant is marked as non-exhaustive
#[non_exhaustive]Amf0Utf8
An AMF0 value was not valid UTF-8 where the format requires text
([AMF0] §2.4/§2.5/§2.14).
Fields
This variant is marked as non-exhaustive
#[non_exhaustive]TooManyChunkStreams
Reassembly held more distinct chunk streams than the per-connection bound allows.
Fields
This variant is marked as non-exhaustive
#[non_exhaustive]InputBudgetExceeded
The in-progress reassembly buffer grew past the per-connection budget (#1108/RTMP-W1).
Fields
This variant is marked as non-exhaustive
#[non_exhaustive]ChunkStreamState
Assembling a message hit a chunk-stream state that cannot complete: a continuation before any chunk, a header on a completed message, a stream without a message type id, or a chunk that does not match its message’s declared length.
Fields
This variant is marked as non-exhaustive
#[non_exhaustive]UnexpectedState
An operation was attempted, or a message arrived, that is not valid
in the session’s current state (e.g. a command received before the
handshake completed, or publish before createStream). The server
maps a rejected publish to NetStream.Publish.BadName; a client
sees a rejected stream key as this variant after publish.
Fields
This variant is marked as non-exhaustive
#[non_exhaustive]InvalidChunkStreamId
A crate::chunk::Message was built with a chunk_stream_id outside
the basic header’s encodable range (2..=65599, RTMP §5.3.1.1), so it
cannot be written.
Fields
This variant is marked as non-exhaustive
FieldOverflow(FieldOverflow)
A length or count did not fit the wire field it is written to
(#1129): a serializer that narrowed a usize with as u32 (then
packed it into a 24-bit field) would have silently wrapped and
emitted a misframed chunk stream; this is returned instead.
OutputBufferTooSmall(OutputBufferTooSmall)
The output buffer passed to serialize_into was smaller than
serialized_len().
Damage(DamageError)
The caller’s broadcast_core::damage::DamagePolicy refused a report
the session was about to publish: the session ends with the same
report inside this error.
Implementations§
Trait Implementations§
Source§impl Error for RtmpError
impl Error for RtmpError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()