Crate rancor

source ·
Expand description


rancor provides scalable and efficient error handling without using type composition. This makes it best-suited for situations where:

  • Programmatic error introspection is not useful
  • Functions may error, but succeed most of the time
  • Errors should provide as much useful detail as possible when emitted
  • Use cases include both no_std and targets with support for std


  • Returns the given error from this function.


  • An error type that preserves all detailed error messages. It is optimized to fit in a single pointer.
  • An error type that only preserves success or failure, throwing away any more detailed error messages.
  • Equips a type with a Fallible implementation that chooses E as its error type.


  • The error type for errors that can never happen.
  • An error type that does not occupy any space, panicking on creation instead.


  • An error type which can be uniformly constructed from a StdError and additional trace information.
  • A type with fallible operations that return its associated error type.
  • A type that can never be produced.
  • Helper methods for Options.
  • Helper methods for Results.
  • A type which can add an additional trace to itself.