pub enum Success {
Callback(usize),
Eos(usize),
Finished(usize),
}Expand description
Parsing function success return values.
Variants§
Callback(usize)
A callback returned false and the parser function exited prematurely. This can be
treated the same as Success::Finished.
§Arguments
(1): The amount of stream bytes that were processed before the callback was executed.
In most cases this will not match stream.len().
Eos(usize)
Additional stream data is expected. Continue executing the parser function until
Success::Finished is returned.
§Arguments
(1): The amount of stream bytes that were processed. This value will always match
stream.len().
Finished(usize)
The parser function finished successfully.
§Arguments
(1): The amount of stream bytes that were processed. Under some circumstances this
will be less than stream.len(). This indicates that there must be a transition
between the current parser function and the next one. For example, a typical HTTP
request would consist of a call to
Parser::parse_head(), and
depending on the content type you may need to transition to
Parser::parse_chunked(),
Parser::parse_multipart(), or
Parser::parse_url_encoded().