[][src]Module dangerous::error

Error support.

Most of what dangerous supports out of the box is good to go. If you need to stretch out performance more, or provide additional functionality on what is provided, the error system should be flexible for those requirements. If it's not, consider opening an issue.

Structs

Expected

A catch-all error for all expected errors supported in this crate.

ExpectedContext

A sealed expected Context.

ExpectedLength

An error representing a failed requirement for a length of Input.

ExpectedValid

An error representing a failed requirement for a valid Input.

ExpectedValue

An error representing a failed exact value requirement of Input.

FullContextStackfull-context

A ContextStack that contains all Contexts collected.

Invalid

Invalid contains no details around what went wrong other than a RetryRequirement if the error is not fatal.

RetryRequirement

An indicator of how many bytes are required to continue processing input.

RootContextStack

A ContextStack that only contains the root ExpectedContext.

Traits

Context

The base context surrounding an error.

ContextStack

A walkable stack of Contexts collected from an error.

ContextStackBuilder

A ContextStack builder.

Details

The required details around an error to produce a verbose report on what went wrong when processing input.

Error

Convenience trait requiring both FromContext and FromExpected.

FromContext

Implemented for errors that collect Contexts.

FromExpected

Convenience trait requiring From for ExpectedValue, ExpectedLength and ExpectedValid.

IntoFatal

Implemented for errors that can have their RetryRequirement removed.

ToRetryRequirement

Implemented for errors that return a RetryRequirement.

Type Definitions

ContextStackWalker

A dynamic function for walking a context stack.