string-adapter
String Adapter is a String adapter for casbin-rs. With this library, Casbin can load policy from String.
Install
Add the following to Cargo.toml
:
= { = "1.1.0", = false, = ["runtime-tokio"]}
= { = "1.42.0", = ["macros"] }
Example
use ;
use StringAdapter;
async
Features
- runtime-async-std: Use
async-std
as the runtime. - runtime-tokio: Use
tokio
as the runtime (default).