Skip to main content

Crate rorpc_macros

Crate rorpc_macros 

Source
Expand description

Thin proc-macro bridge for rorpc_parse.

This crate contains only proc-macro entry points. All parsing, validation, and code generation logic lives in rorpc-parse where it can be tested with normal #[test] functions.

Macros§

router
Auto-discovery router macro with optional module path filtering.

Attribute Macros§

contract
Automatically generate TypeScript contract before fn main() runs (debug builds only).
delete
Shorthand for #[orpc::route(method = "DELETE", path = "...")].
get
Shorthand for #[orpc::route(method = "GET", path = "...")].
namespace
Apply a namespace prefix to all handlers within a module.
patch
Shorthand for #[orpc::route(method = "PATCH", path = "...")].
post
Shorthand for #[orpc::route(method = "POST", path = "...")].
put
Shorthand for #[orpc::route(method = "PUT", path = "...")].
route
Annotate an Axum handler with explicit HTTP method and path.

Derive Macros§

OrpcError
Derive macro for registering error enum variants with rorpc.
ZodTs
Derive macro that generates a fn zod_ts() -> String method on structs and enums.