Skip to main content

converge_pack/gate/
error.rs

1//! Error types for gate infrastructure
2
3use thiserror::Error;
4
5pub type GateResult<T> = std::result::Result<T, GateError>;
6
7#[derive(Error, Debug, Clone, PartialEq)]
8pub enum GateError {
9    #[error("invalid input: {0}")]
10    InvalidInput(String),
11}
12
13impl GateError {
14    pub fn invalid_input(msg: impl Into<String>) -> Self {
15        Self::InvalidInput(msg.into())
16    }
17}