[][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 context stack 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 context stack 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.

Error

Convenience trait requiring both FromContext and FromExpected.

ErrorDetails

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

FromContext

Implemented for errors that collect contexts.

FromExpected

Convenience trait requiring ExpectedValue, ExpectedLength and ExpectedValid.

ToRetryRequirement

Implemented for errors that return input requirements.

Type Definitions

ContextStackWalker

A dynamic function for walking a context stack.