pub enum Error {
Io(Error),
UnexpectedEof,
UnsupportedHandshakeVersion(u8),
InvalidAmf0(String),
InvalidChunk(String),
InvalidCommand(String),
ProtocolViolation(String),
Rejected(String),
Timeout,
Other(String),
}Variants§
Io(Error)
Underlying TCP / read / write I/O failure.
UnexpectedEof
Peer closed the connection mid-protocol.
UnsupportedHandshakeVersion(u8)
Handshake byte 0 was not the expected version 3.
InvalidAmf0(String)
Saw bytes that don’t match any valid AMF0 marker.
InvalidChunk(String)
Saw a chunk message header shape or reserved value we don’t know how to interpret.
InvalidCommand(String)
Command message arrived without the expected name / transaction
id / args (e.g. connect missing its command object).
ProtocolViolation(String)
A sub-protocol field (window ack size, chunk size, peer bandwidth) carries a value outside its legal range.
Rejected(String)
Consumer rejected a publish attempt via PublishRequest::reject.
The string is the reason passed to onStatus.
Timeout
We waited for a specific message and the deadline elapsed.
Other(String)
Generic bucket for situations that don’t deserve a dedicated variant (e.g. malformed AVC sequence header payload).
Trait Implementations§
Source§impl Error for Error
impl Error for Error
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()