13 #include <datatype99.h>
16 #include <smolrtsp/priv/compiler_attrs.h>
68 (SmolRTSP_ParseError_ContentLength, CharSlice99),
69 (SmolRTSP_ParseError_StrMismatch, CharSlice99, CharSlice99),
71 (SmolRTSP_ParseError_HeaderMapOverflow),
72 (SmolRTSP_ParseError_MissingCSeq),
73 (SmolRTSP_ParseError_InvalidCSeq, CharSlice99)
88 SMOLRTSP_PRIV_MUST_USE;
104 SmolRTSP_ParseStatus,
105 (SmolRTSP_ParseStatus_Complete,
size_t),
106 (SmolRTSP_ParseStatus_Partial)
114 SMOLRTSP_PRIV_MUST_USE;
120 SMOLRTSP_PRIV_MUST_USE;
130 SmolRTSP_ParseResult,
131 (SmolRTSP_ParseResult_Success, SmolRTSP_ParseStatus),
132 (SmolRTSP_ParseResult_Failure, SmolRTSP_ParseError)
152 SMOLRTSP_PRIV_MUST_USE;
158 SMOLRTSP_PRIV_MUST_USE;
164 SMOLRTSP_PRIV_MUST_USE;
170 SMOLRTSP_PRIV_MUST_USE;
bool SmolRTSP_ParseStatus_is_complete(SmolRTSP_ParseStatus self) SMOLRTSP_PRIV_MUST_USE
Returns whether self is complete.
bool SmolRTSP_ParseResult_is_success(SmolRTSP_ParseResult self) SMOLRTSP_PRIV_MUST_USE
Returns whether self is successful.
int SmolRTSP_ParseError_print(SmolRTSP_ParseError self, SmolRTSP_Writer w) SMOLRTSP_PRIV_MUST_USE
Prints self into w.
SmolRTSP_ParseResult SmolRTSP_ParseResult_partial(void) SMOLRTSP_PRIV_MUST_USE
Creates a successful and partial parse result.
const char * SmolRTSP_ParseType_str(SmolRTSP_ParseType self) SMOLRTSP_PRIV_MUST_USE
Returns a string representation of self.
SmolRTSP_ParseResult SmolRTSP_ParseResult_complete(size_t offset) SMOLRTSP_PRIV_MUST_USE
Creates a successful and complete parse result with the byte offset offset (from the beginning of inp...
bool SmolRTSP_ParseResult_is_partial(SmolRTSP_ParseResult self) SMOLRTSP_PRIV_MUST_USE
Returns whether self is both successful and partial.
bool SmolRTSP_ParseStatus_is_partial(SmolRTSP_ParseStatus self) SMOLRTSP_PRIV_MUST_USE
Returns whether self is partial.
bool SmolRTSP_ParseResult_is_complete(SmolRTSP_ParseResult self) SMOLRTSP_PRIV_MUST_USE
The same as SmolRTSP_ParseResult_is_partial but for a complete result.
datatype99(SmolRTSP_ParseError,(SmolRTSP_ParseError_ContentLength, CharSlice99),(SmolRTSP_ParseError_StrMismatch, CharSlice99, CharSlice99),(SmolRTSP_ParseError_TypeMismatch, SmolRTSP_ParseType, CharSlice99),(SmolRTSP_ParseError_HeaderMapOverflow),(SmolRTSP_ParseError_MissingCSeq),(SmolRTSP_ParseError_InvalidCSeq, CharSlice99))
An error that might occur during parsing.
SmolRTSP_ParseType
Types of data that can be failed to parse.
Definition: error.h:21
@ SmolRTSP_ParseType_Int
An integer (-34, 0, 123).
Definition: error.h:25
@ SmolRTSP_ParseType_HeaderName
A header name (Content-Length, Authorization).
Definition: error.h:35
@ SmolRTSP_ParseType_Ident
An identifier (abc).
Definition: error.h:30
bool SmolRTSP_ParseResult_is_failure(SmolRTSP_ParseResult self) SMOLRTSP_PRIV_MUST_USE
Returns whether self is a failure.