Cargo Features

[dependencies]
casbin = { version = "2.5.0", default-features = false, features = ["cached", "explain", "glob", "incremental", "ip", "logging", "runtime-async-std", "runtime-tokio", "watcher", "tokio-stream"] }
default = incremental, runtime-tokio

These default features are set whenever casbin is added without default-features = false somewhere in the dependency tree.

cached = mini-moka
explain

Affects effector::EffectorStream.explain, logger::Logger.print_explain_log

glob = globset

Affects function_map::glob_match

incremental default

Affects core_api::CoreApi.build_incremental_role_links, model::Model.build_incremental_role_links

ip = ip_network

Affects function_map::ip_match

logging = slog, slog-async, slog-term

Affects core_api::CoreApi.get_logger, core_api::CoreApi.set_logger, core_api::CoreApi.enable_log

runtime-async-std = async-std
runtime-tokio default

Enables fs and io-util of tokio

watcher

Affects core_api::CoreApi.set_watcher, core_api::CoreApi.get_watcher, core_api::CoreApi.get_mut_watcher, core_api::CoreApi.enable_auto_notify_watcher, core_api::CoreApi.has_auto_notify_watcher_enabled

Features from optional dependencies

In crates that don't use the dep: syntax, optional dependencies automatically become Cargo features. These features may have been created by mistake, and this functionality may be removed in the future.

async-std runtime-async-std?
globset glob?
ip_network ip?
mini-moka cached?
slog logging?
slog-async logging?
slog-term logging?
tokio runtime-tokio
tokio-stream implicit feature

Enables tokio-stream

tokio-stream:

Utilities to work with Stream and tokio