use async_trait::async_trait;
use crate::error::RbacError;
#[async_trait]
pub trait RbacSubject {
fn get_id(&self) -> String;
async fn has_permission(&self, permission: &str) -> Result<bool, RbacError>;
async fn has_role(&self, role: &str) -> Result<bool, RbacError>;
async fn get_permissions(&self) -> Result<Vec<String>, RbacError>;
async fn get_roles(&self) -> Result<Vec<String>, RbacError>;
}