yaml-adapter 1.0.0

a adapter which reads yaml format policy file for casbin repo
Documentation
1
2
3
4
5
6
7
8
9
10
11
use serde::{Deserialize, Serialize};
use std::collections::HashMap;

#[derive(Serialize, Deserialize, Debug)]
pub(crate) struct Policies(pub(crate) HashMap<String, Vec<Vec<String>>>);

impl Policies {
    pub fn new() -> Policies {
        Policies(HashMap::new())
    }
}