Expand description
Traits and macros used by most projects. Add use snafu::prelude::* to your code to quickly get started with
SNAFU.
Re-exports§
pub use crate::OptionExt as _;pub use crate::ResultExt as _;pub use crate::futures::TryFutureExt as _;futurespub use crate::futures::TryStreamExt as _;futures
Macros§
- ensure
- Ensure a condition is true. If it is not, return from the function with an error.
- ensure_
whatever alloc - Ensure a condition is true. If it is not, return a stringly-typed error message.
- whatever
alloc - Instantiate and return a stringly-typed error message.
Derive Macros§
- Snafu
- The
Snafumacro is the entrypoint to defining your own error types. It is designed to require little configuration for the recommended and typical usecases while still offering flexibility for unique situations.