Crate xroute

Crate xroute 

Source
Expand description

see repo readme

Modules§

prelude
Commonly used items
x
Macro-used items, not for direct use

Macros§

enforce
Enforce that a Result is Ok, otherwise return the Err as a response
router
Generate a router function

Functions§

enforce_user
Enforce that the request has a user header, otherwise return a 401 response
redirect
Generate a redirect response to the given URL
run
Run an Axum server with the given router and static file serving
streamed_response
Create a streamed SSE response from an iterator and a mapping function

Attribute Macros§

main
Generate a main function that runs the async runtime and calls the annotated function
request
Mark the item as a request type
response
Mark the item as a response type
state
Mark the item as a state type
submodule
Mark the module as a submodule with routes