nrc-mls-storage 0.1.0

Storage abstraction for nostr-mls that wraps OpenMLS storage backends
Documentation
//! Error types for the welcomes module

use std::fmt;

/// Error types for the welcomes module
#[derive(Debug)]
pub enum WelcomeError {
    /// Invalid parameters
    InvalidParameters(String),
    /// Database error
    DatabaseError(String),
}

impl std::error::Error for WelcomeError {}

impl fmt::Display for WelcomeError {
    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
        match self {
            Self::InvalidParameters(message) => write!(f, "Invalid parameters: {}", message),
            Self::DatabaseError(message) => write!(f, "Database error: {}", message),
        }
    }
}