Skip to main content

Module error

Module error 

Source
Expand description

Error type returned by codec and framing operations.

All fallible APIs in this crate return Result<T>, which is core::result::Result<T, Error>. The Error enum is #[non_exhaustive] so future variants can be added without breaking semver.

§Cursor state on error

Every read, write, encode, decode, and frame operation in this crate leaves the ReadBuf or WriteBuf it was given at the position it had before the call when it returns Err. See the crate-level “Error contract” for which writers also leave the bytes past the cursor untouched. Use ReadBuf::position to report where in the input a failure occurred.

Enums§

Error
Errors returned by codec and framing operations.

Type Aliases§

Result
Result alias used throughout the crate.