mik-sdk-macros
Procedural macros for mik-sdk.
Usage
This crate is an implementation detail of mik-sdk. You should depend on mik-sdk directly:
[]
= "0.1"
Macros Provided
| Macro | Purpose |
|---|---|
routes! |
Type-safe HTTP routing with path, query, body extraction |
ok! |
JSON response (200 OK) |
error! |
RFC 7807 error response |
created! |
201 Created with Location header |
redirect! |
302 redirect |
guard! |
Early return validation |
ensure! |
Unwrap Option/Result or return error |
fetch! |
HTTP client request builder |
json! |
JSON value builder |
log! |
Structured logging |
#[derive(Type)] |
JSON body/response with validation |
#[derive(Query)] |
Query string parameters |
#[derive(Path)] |
URL path parameters |
See the mik-sdk documentation for usage examples.
License
Licensed under MIT license.