Crate mik_sdk_macros

Crate mik_sdk_macros 

Source
Expand description

Proc-macros for mik-sdk - clean JSON syntax for WASI HTTP handlers.

Macros§

accepted
Return 202 Accepted.
bad_request
Return 400 Bad Request.
conflict
Return 409 Conflict.
created
Create a 201 Created response.
ensure
Unwrap Option/Result or return error.
error
Return RFC 7807 Problem Details error response.
fetch
Build an HTTP client request.
forbidden
Return 403 Forbidden.
guard
Early return validation guard.
ids
Collect field values from a list.
json
Create a JSON value with clean syntax.
no_content
Create a 204 No Content response.
not_found
Return 404 Not Found.
ok
Return 200 OK with JSON body.
redirect
Create a redirect response.
routes
Define routes with typed inputs and OpenAPI generation.

Derive Macros§

Path
Derive macro for path parameter types.
Query
Derive macro for query parameter types.
Type
Derive macro for JSON body types.