aboutsummaryrefslogtreecommitdiff
path: root/src/errors/di_container.rs
blob: 127676fa5b22caaf20641d2b749901022d47e9c8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
//! Error types for the DI container.

use std::fmt;
use std::fmt::{Display, Formatter};

use error_stack::Context;

/// Error for when the DI container fails to do something.
#[derive(Debug)]
pub struct DIContainerError;

impl Display for DIContainerError
{
    fn fmt(&self, fmt: &mut Formatter<'_>) -> fmt::Result
    {
        fmt.write_str("A DI container error has occurred")
    }
}

impl Context for DIContainerError {}

/// Error for when the binding builder fails to do something.
#[derive(Debug)]
pub struct BindingBuilderError;

impl Display for BindingBuilderError
{
    fn fmt(&self, fmt: &mut Formatter<'_>) -> fmt::Result
    {
        fmt.write_str("A binding builder error has occurred")
    }
}

impl Context for BindingBuilderError {}