use std::collections::HashMap;
use cedar_policy::{EntityUid, RestrictedExpression};
use crate::error::PolicyError;
pub(crate) trait CedarAtom {
fn cedar_type() -> &'static str;
fn cedar_attr(&self) -> Result<HashMap<String, RestrictedExpression>, PolicyError> {
let res: HashMap<String, RestrictedExpression> = HashMap::new();
Ok(res)
}
fn cedar_entity_uid(&self) -> Result<EntityUid, PolicyError> {
self.cedar_id()
.parse::<EntityUid>()
.map_err(|e| PolicyError::ParseError(e.to_string()))
}
fn cedar_id(&self) -> String;
}