spawn-access-control 0.1.12

A Rust library for access control management with WebAssembly support, including role-based access control (RBAC), permissions, and audit logging.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use crate::alert_system::{AlertNotification, AlertSeverity};
use async_trait::async_trait;

#[async_trait]
pub trait NotificationHandler: Send + Sync {
    async fn send_notification(&self, notification: &AlertNotification) -> Result<(), NotificationError>;
}

#[derive(Debug, thiserror::Error)]
pub enum NotificationError {
    #[error("Failed to send notification: {0}")]
    SendError(String),
    
    #[error("Channel configuration error: {0}")]
    ConfigError(String),
}