domain_patterns 0.2.141

Domain patterns holds patterns from the world of Domain Driven Design.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use snafu::{Snafu, ResultExt, Backtrace, ErrorCompat, ensure};
use std::fmt;
use std::result;

pub type Result<T> = result::Result<T, Error>;

#[derive(Debug, Snafu)]
pub enum Error {
    /// NotAuthorized conveys that the caller is not authorized to commit the action.
    #[snafu(display("didn't find that"))]
    NotFound,

    #[snafu(display("invalid email address"))]
    EmailError,
}