Suika Server
Suika Server is a core component for handling HTTP requests and responses in the Suika web stack.
Note: Suika is under active development and not intended for production use. The API is subject to change and may lack comprehensive testing and documentation.
Installation
To use Suika server in your Rust project, add the following to your Cargo.toml:
[]
= "0.1.0"
Library Features
- HTTP Handling
- Request: Represents an HTTP request.
- Response: Represents an HTTP response.
- HttpError: Represents errors that can occur during HTTP handling.
- Middleware
- combine_middlewares: Combines multiple middleware functions.
- cors_middleware: Middleware for handling CORS (Cross-Origin Resource Sharing).
- favicon_middleware: Middleware for serving a favicon.
- logger_middleware: Middleware for logging HTTP requests and responses.
- static_file_middleware: Middleware for serving static files.
- MiddlewareFn: Type alias for a middleware function.
- NextMiddleware: Represents the next middleware in the chain.
- Routing
- Router: Represents the routing logic for handling different HTTP routes.
- Server
- Server: Represents the HTTP server.
Example usage
use ;
use Arc;