agp-config 0.1.8

Configuration utilities
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// Copyright AGNTCY Contributors (https://github.com/agntcy)
// SPDX-License-Identifier: Apache-2.0

use thiserror::Error;

#[derive(Error, Debug)]
pub enum ConfigurationError {
    #[error("configuration error: {0}")]
    ConfigError(String),
    #[error("unknown error")]
    Unknown,
}

pub trait Configuration {
    /// Validate the component configuration
    fn validate(&self) -> Result<(), ConfigurationError>;
}