| Crates.io | mik-sdk-macros |
| lib.rs | mik-sdk-macros |
| version | 0.1.2 |
| created_at | 2025-12-28 07:44:08.633283+00 |
| updated_at | 2026-01-02 21:40:37.013292+00 |
| description | Proc-macros for mik-sdk - routes!, ok!, error!, fetch!, derive macros |
| homepage | |
| repository | https://github.com/dufeut/mik-sdk |
| max_upload_size | |
| id | 2008348 |
| size | 424,303 |
Procedural macros for mik-sdk.
This crate is an implementation detail of mik-sdk. You should depend on mik-sdk directly:
[dependencies]
mik-sdk = "0.1"
| 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.
Licensed under MIT license.