Skip to main content

Crate vyuh_macros

Crate vyuh_macros 

Source

Macros§

bundle
Collects bundle parts (routes, tasks, signals) into a Bundle for composition and registration.
embed_assets
Embeds one asset directory using Vyuh’s asset facade.
embed_migrations
Embeds YAML migrations using Vyuh’s database facade.

Attribute Macros§

asset_dir
beacon
Defines one declarative authenticated Beacon route.
cron
Registers a cron emitter.
flow
Registers a synchronous factory built once per site into an immutable Flow. Equivalent to bundles::flow(factory, FlowConf::new(name)). Accepts name, lane, idempotency, and optional dispatch = Policy configuration. The optional Pravah integration requires the pravah feature. Rust bounds reject async factories and runtime input/continuation extraction; no type syntax is inspected.
mcp_resource
Defines one static MCP resource factory.
mcp_tool
Defines a semantic MCP-only tool backed by a typed Vyuh callable.
migrations
openapi
periodic
Registers a fixed-interval emitter.
pgnotify
Registers a PostgreSQL LISTEN/NOTIFY emitter.
route
Defines a route handler with metadata for routing and OpenAPI documentation.
schema
service
signal
Registers a function as a typed signal handler.
test
Builds an isolated TestSite around an async integration-test body.
url_info
work
Registers an asynchronous Work task handler.
work_batch
Registers a value-only local Work batch handler.

Derive Macros§

Filterable
ManagedRecord
Derives physical-column mapping for migration-managed record values.
Model
MultipartData
Derives multipart form parsing for named structs.
Record
SortKey
SqlEnum
Derives a SQL-backed enum mapping through Vyuh’s database facade.
Validate
Derives the Validate trait for data validation.