Skip to main content

Crate milo_parser

Crate milo_parser 

Source

Structs§

CStringWithLength
Parser
ParserCallbacks

Enums§

Callbacks
Errors
Methods
States

Constants§

CALLBACK_ACTIVE_ALL
CALLBACK_ACTIVE_NONE
CALLBACK_ACTIVE_ON_BODY
CALLBACK_ACTIVE_ON_CHUNK
CALLBACK_ACTIVE_ON_CHUNK_EXTENSION_NAME
CALLBACK_ACTIVE_ON_CHUNK_EXTENSION_VALUE
CALLBACK_ACTIVE_ON_CHUNK_LENGTH
CALLBACK_ACTIVE_ON_CONNECT
CALLBACK_ACTIVE_ON_DATA
CALLBACK_ACTIVE_ON_ERROR
CALLBACK_ACTIVE_ON_FINISH
CALLBACK_ACTIVE_ON_HEADERS
CALLBACK_ACTIVE_ON_HEADER_NAME
CALLBACK_ACTIVE_ON_HEADER_VALUE
CALLBACK_ACTIVE_ON_MESSAGE_COMPLETE
CALLBACK_ACTIVE_ON_MESSAGE_START
CALLBACK_ACTIVE_ON_METHOD
CALLBACK_ACTIVE_ON_PROTOCOL
CALLBACK_ACTIVE_ON_REASON
CALLBACK_ACTIVE_ON_REQUEST
CALLBACK_ACTIVE_ON_RESET
CALLBACK_ACTIVE_ON_RESPONSE
CALLBACK_ACTIVE_ON_STATE_CHANGE
CALLBACK_ACTIVE_ON_STATUS
CALLBACK_ACTIVE_ON_TRAILERS
CALLBACK_ACTIVE_ON_TRAILER_NAME
CALLBACK_ACTIVE_ON_TRAILER_VALUE
CALLBACK_ACTIVE_ON_UPGRADE
CALLBACK_ACTIVE_ON_URL
CALLBACK_ACTIVE_ON_VERSION
CALLBACK_ON_BODY
CALLBACK_ON_CHUNK
CALLBACK_ON_CHUNK_EXTENSION_NAME
CALLBACK_ON_CHUNK_EXTENSION_VALUE
CALLBACK_ON_CHUNK_LENGTH
CALLBACK_ON_CONNECT
CALLBACK_ON_DATA
CALLBACK_ON_ERROR
CALLBACK_ON_FINISH
CALLBACK_ON_HEADERS
CALLBACK_ON_HEADER_NAME
CALLBACK_ON_HEADER_VALUE
CALLBACK_ON_MESSAGE_COMPLETE
CALLBACK_ON_MESSAGE_START
CALLBACK_ON_METHOD
CALLBACK_ON_PROTOCOL
CALLBACK_ON_REASON
CALLBACK_ON_REQUEST
CALLBACK_ON_RESET
CALLBACK_ON_RESPONSE
CALLBACK_ON_STATE_CHANGE
CALLBACK_ON_STATUS
CALLBACK_ON_TRAILERS
CALLBACK_ON_TRAILER_NAME
CALLBACK_ON_TRAILER_VALUE
CALLBACK_ON_UPGRADE
CALLBACK_ON_URL
CALLBACK_ON_VERSION
ERROR_CALLBACK_ERROR
ERROR_INVALID_CHUNK_SIZE
ERROR_INVALID_CONTENT_LENGTH
ERROR_INVALID_STATUS
ERROR_INVALID_TRANSFER_ENCODING
ERROR_INVALID_VERSION
ERROR_MISSING_CONNECTION_UPGRADE
ERROR_NONE
ERROR_UNEXPECTED_CHARACTER
ERROR_UNEXPECTED_CONTENT
ERROR_UNEXPECTED_CONTENT_LENGTH
ERROR_UNEXPECTED_DATA
ERROR_UNEXPECTED_EOF
ERROR_UNEXPECTED_STATE
ERROR_UNEXPECTED_TRAILERS
ERROR_UNEXPECTED_TRANSFER_ENCODING
ERROR_UNSUPPORTED_HTTP_VERSION
ERROR_USER
METHOD_CONNECT
METHOD_DELETE
METHOD_GET
METHOD_HEAD
METHOD_OPTIONS
METHOD_OTHER
METHOD_PATCH
METHOD_POST
METHOD_PRI
METHOD_PUT
METHOD_TRACE
STATE_BODY_DECISION
STATE_BODY_VIA_CONTENT_LENGTH
STATE_BODY_WITH_NO_LENGTH
STATE_CHUNK_DATA
STATE_CHUNK_EXTENSIONS
STATE_CHUNK_HEADER
STATE_ERROR
STATE_FINISH
STATE_HEADER
STATE_HTTP2_PREFACE
STATE_REQUEST_LINE
STATE_START
STATE_STATUS_LINE
STATE_TRAILER
STATE_TUNNEL

Functions§

milo_clear
Clears all values about the message in the parser.
milo_create
Creates a new parser.
milo_destroy
Destroys a parser.
milo_error_code_string
Returns the current parser’s error state as string.
milo_error_description_string
Returns the current parser’s error descrition.
milo_fail
Marks the parsing a failed, setting a error code and and error message.
milo_finish
Marks the parser as finished. Any new data received via milo_parse will put the parser in the error state.
milo_free_string
Cleans up memory used by a string previously returned by one of the milo’s C public interface.
milo_has_debug
Returns if debug informations are available in this build.
milo_noop
A callback that simply returns 0.
milo_parse
Parses a slice of characters. It returns the number of consumed characters.
milo_pause
Pauses the parser. It will have to be resumed via milo_resume.
milo_reset
Resets a parser. The second parameters specifies if to also reset the parsed counter.
milo_resume
Resumes the parser.
milo_state_string
Returns the current parser’s state as string.

Type Aliases§

Callback
StateHandler