[][src]Type Definition err_context::AnyError

type AnyError = Box<dyn Error + Send + Sync>;

A type alias for boxed errors.

By convention, errors should be Send and Sync (because they are usually just dumb values). Everything in the crate should work even with similar types without these bounds.

Re-defining the type alias (or using it without the type alias) works too. This is just convenience and self-explanation of code.

It is possible a similar type alias will eventually get added to the standard library. If so, the crate will be automatically compatible with that too.