mik-sdk-macros

Crates.iomik-sdk-macros
lib.rsmik-sdk-macros
version0.1.2
created_at2025-12-28 07:44:08.633283+00
updated_at2026-01-02 21:40:37.013292+00
descriptionProc-macros for mik-sdk - routes!, ok!, error!, fetch!, derive macros
homepage
repositoryhttps://github.com/dufeut/mik-sdk
max_upload_size
id2008348
size424,303
(dufeut)

documentation

README

mik-sdk-macros

Crates.io Documentation

Procedural macros for mik-sdk.

Usage

This crate is an implementation detail of mik-sdk. You should depend on mik-sdk directly:

[dependencies]
mik-sdk = "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.

Commit count: 0

cargo fmt