Expand description
Quickly set up a backend web framework using rust. Very fast and easy to use.
Re-exports§
pub use request_info::RequestInfo;
pub use request_info::Method;
Modules§
Structs§
- Server
Config - The ServerConfig struct contains changeable fields which configures the server during both startup and whilst it’s running.
Enums§
- Function
- Rust does not provide a way of doing function overloads, which would be helpful in some cases. However this enum is like a way of solving that issue. When creating an API function which will be executed at some endpoint, the function will automatically contain three parameters: stream, headers, and body. However most of the time, you won’t need to use ex the body (in ex. GET requests). So, this enum will let you choose which params you want your function to use, however all functions need to have a stream as a parameter because otherwise the server will not be able to respond correctly.
- Route
- A quick way of nesting routes inside of eachother stacks can contain either yet another stack, or a tail, which will act as an API-endpoint. This enum is used for the server config when initializing the server.
Functions§
- start
- Start the server using this function. It takes a ‘ServerConfig’ struct as input and returns a result, because setting up the server might fail.