#[non_exhaustive]pub enum RtmpError {
BufferTooShort(BufferTooShort),
Malformed {
what: &'static str,
},
UnexpectedState {
what: &'static str,
},
Unsupported {
what: &'static str,
},
InvalidChunkStreamId {
chunk_stream_id: u32,
},
FieldOverflow(FieldOverflow),
OutputBufferTooSmall(OutputBufferTooSmall),
}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).
Malformed
The input did not conform to the expected wire layout (bad handshake
version, invalid chunk fmt/CSID encoding, malformed AMF0 value, or
similar).
UnexpectedState
An operation was attempted that is not valid in the session’s current
state (e.g. a command received before the handshake completed, or
publish before createStream).
Unsupported
The input used a feature or value this engine does not (yet) support (e.g. AMF3, an unrecognised command name).
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.
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().
Trait Implementations§
impl Eq for RtmpError
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()