Skip to main content

agp_config/component/
configuration.rs

1// Copyright AGNTCY Contributors (https://github.com/agntcy)
2// SPDX-License-Identifier: Apache-2.0
3
4use thiserror::Error;
5
6#[derive(Error, Debug)]
7pub enum ConfigurationError {
8    #[error("configuration error: {0}")]
9    ConfigError(String),
10    #[error("unknown error")]
11    Unknown,
12}
13
14pub trait Configuration {
15    /// Validate the component configuration
16    fn validate(&self) -> Result<(), ConfigurationError>;
17}