docs: fix broken links (#6)

* fix: fix broken links

* docs: add badge
1 file changed
tree: cbe3d49863a3605450d639b7f800d3aa7686fc8f
  1. .github/
  2. examples/
  3. src/
  4. tests/
  5. .gitignore
  6. Cargo.toml
  7. LICENSE
  8. README.md
README.md

yaml-adapter

crates docs download ci

Yaml Adapter is a yaml adapter for Casbin-rs. With this library, Casbin can load policy from yaml fromat file or save policy into it with fully asynchronous support.

Dependency

Add following to Cargo.toml

yaml-adapter = { version = "1.0.0", features = "runtime-async-std" }
async-std = "1.5.0"

for using tokio

yaml-adapter = { version = "1.0.0", features = "runtime-tokio" }
tokio = "0.3.1"

Examples

let adapter = YamlAdapter::new("examples/rbac_policy.yaml");
let e = Enforcer::new(m, adapter).await.unwrap();

for policy file configuration, please refer to example