66 releases (8 breaking)
Uses new Rust 2024
| new 0.15.1 | Mar 12, 2026 |
|---|---|
| 0.14.6 | Mar 10, 2026 |
#1500 in WebAssembly
Used in 3 crates
(2 directly)
6KB
96 lines
canic-dsl
Symbolic tokens for Canic endpoint macros.
This crate defines zero-cost marker constants used inside #[canic_query] and
#[canic_update] attributes. The symbols are never evaluated; the proc-macro
crate pattern-matches on identifiers and expands them into runtime access calls.
Use requires(...) expressions with all(...), any(...), and not(...) to
compose predicates.
use canic_dsl::access::{app, caller};
use canic_dsl_macros::canic_update;
#[canic_update(requires(app::allows_updates(), caller::is_controller()))]
async fn admin_only_expr() -> Result<(), canic::Error> {
Ok(())
}