pub enum Error {
Show 39 variants
Encoding,
RequestLineMalformed {
line: String,
},
VersionMissing {
line: String,
},
StatusCodeMissing {
line: String,
},
MethodUnknown {
method: String,
},
UriMissing {
line: String,
},
UriMalformed {
line: String,
uri: String,
},
UriNotAbsolute {
uri: Uri,
},
ReasonPhraseMissing {
line: String,
},
VersionMalformed {
line: String,
version: String,
},
StatusCodeNotInteger {
line: String,
status_code: String,
},
HeaderMalformed {
line: String,
},
ContentLengthMissing,
ContentLengthNotInteger {
value: String,
},
HeadAlreadyDone,
BodyAlreadyDone,
MetadataNotParsed,
NotDone,
VersionUnknown,
TransportProtocolProfileMissing {
value: String,
},
TransportLowerUnknown {
value: String,
},
TransportParameterUnknown {
var: String,
},
TransportParameterValueMissing {
var: String,
},
TransportParameterValueInvalid {
var: String,
val: String,
},
TransportParameterInvalid {
parameter: String,
},
TransportChannelMalformed {
value: String,
},
TransportPortMalformed {
value: String,
},
InterleavedInvalid,
InterleavedPayloadTooLarge,
RangeMalformed {
value: String,
},
RangeUnitNotSupported {
value: String,
},
RangeTimeNotSupported {
value: String,
},
RangeNptTimeMalfored {
value: String,
},
RtpInfoUrlMissing {
value: String,
},
RtpInfoParameterUnknown {
value: String,
},
RtpInfoParameterInvalid {
value: String,
},
RtpInfoParameterUnexpected {
value: String,
},
Shutdown,
Io(Error),
}Variants§
Encoding
An error occurred decoding the header due to incorrect usage of text encoding by the sender.
RequestLineMalformed
The request line of the head part is malformed.
VersionMissing
The header first line does have a method and target URI, but it does not have a version, which is the required third part of the first line of the head.
StatusCodeMissing
The response status line does have a version, but does not have a status code which is required.
MethodUnknown
The specified method is not a valid method.
UriMissing
The header first line does have a method, but it does not have a target URI, which is the required second part of the first line of the head.
UriMalformed
The header first line has a Request-URI, but it could not be parsed correctly.
UriNotAbsolute
The Request-URI is correct, but represents a relative path, which is not allowed in RTSP.
ReasonPhraseMissing
The response status line has a version and status code, but is missing a reason phrase which is required.
VersionMalformed
The version specifier is incorrect. It should start with “RTSP/” followed by a digit, “.” and another digit.
StatusCodeNotInteger
The provided status code is not an unsigned integer or cannot be converted to one. It must be a 3-digit non-negative number.
HeaderMalformed
Header line is malformed.
ContentLengthMissing
The Content-Length header is missing, but it is required.
ContentLengthNotInteger
The Content-Length header is not an integer value, or cannot be converted to an unsigned integer.
HeadAlreadyDone
This occurs when the caller invokes the state machine with a state that signals that parsing the head part of the request was already done before.
BodyAlreadyDone
This occurs when the caller invokes the state machine with a state that signals that parsing the body part of the request was already done before.
MetadataNotParsed
Metadata was not parsed for some reason.
NotDone
This occurs when the caller tries to turn the parser into an actual request, but the parser was not ready yet.
VersionUnknown
This occurs when trying to serialize a request that does not have a known version.
TransportProtocolProfileMissing
Transport header does not have protocol and profile string.
The transport must start with RTP/AVP, where RTP denotes
the protocol and AVP the profile.
TransportLowerUnknown
Transport header contains unknown lower protocol. Use either
TCP or UDP.
TransportParameterUnknown
Transport header contains unknown parameter. Please see RFC 2326 Section 12.39 for a list of permissable parameters.
TransportParameterValueMissing
Transport header contains parameter that should have a value, but does not have one.
TransportParameterValueInvalid
Transport header contains parameter with invalid value.
TransportParameterInvalid
Transport header contains invalid or malformed parameter.
TransportChannelMalformed
Transport header channel is malformed.
TransportPortMalformed
Transport header port is malformed.
InterleavedInvalid
Tried to parse interleaved data but there is no interleaved
header. Interleaved packets always start with $ (0x24).
InterleavedPayloadTooLarge
Interleaved payload too large. The size cannot be larger than the maximum value of a 16-bit unsigned integer.
RangeMalformed
Range header value malformed.
RangeUnitNotSupported
Parser does not support provided Range header unit.
RangeTimeNotSupported
Parser does not support effective time in Range header.
RangeNptTimeMalfored
The NPT time (either the from or to part of the time specifier) is malformed.
RtpInfoUrlMissing
RTP Info must always contain a URL.
RtpInfoParameterUnknown
RTP Info parameter is not known. This means that the RTP part contains an unknown or non-existant parameter variable.
RtpInfoParameterInvalid
RTP Info parameter is invalid. This happens, for example, when
the seq parameter is not an integer.
RtpInfoParameterUnexpected
RTP Info contains unexpected extra parameter.
Shutdown
Underlying socket was shut down. This is not really an error and consumers are expected to handle it gracefully.
Io(Error)
I/O error occurred.