Crate salvo

source ·
Expand description

Salvo is a powerful web framework that can make your work easier.

salvo uses a set of [feature flags] to reduce the amount of compiled and optional dependencies.

§Feature flags

FeatureDescriptionDefault?
cookieSupport for Cookie✔️
`server``Built-in Server implementation✔️
http1Support for HTTP 1.1 protocol✔️
http2Support for HTTP 2 protocol✔️
quinnUse quinn to support HTTP 3 protocol
testUtilities for testing application✔️
acmeAutomatically obtain certificates through ACME
rustlsTLS built on rustls
opensslTLS built on openssl-tls
native-tlsTLS built on native-tls
unixListener based on unix socket
tower-compatAdapters for tower::Layer and tower::Service
anyhowIntegrate with the anyhow crate
eyreIntegrate with the eyre crate
affixMiddleware for adding prefix and suffix to the request path
basic-authMiddleware for basic authentication
caching-headersMiddleware for setting caching headers
catch-panicMiddleware for catching panics
concurrency-limiterMiddleware for limiting concurrency
force-httpsMiddleware for forcing HTTPS
loggingMiddleware for logging requests and responses
request-idMiddleware for setting a request ID
size-limiterMiddleware for limiting request size
sseServer-Sent Events (SSE) middleware
timeoutMiddleware for setting a timeout
trailing-slashMiddleware for handling trailing slashes
websocketWebSocket implementation

Re-exports§

Modules§

  • affixaffix
    Middleware for add any data to depot.
  • basic_authbasic-auth
    Middleware for basic authentication.
  • caching_headerscaching-headers
    Middleware for etag and last-modified-since headers.
  • catch_paniccatch-panic
    Middleware for catch panic in handlers.
  • Catch and handle errors.
  • concurrency_limiterconcurrency-limiter
    Middleware for limit concurrency.
  • Various listener implementations for handling HTTP connections.
  • Extract is a feature to let you deserialize request to custom type.
  • force_httpsforce-https
    Middleware force redirect to https.
  • Filesystem module
  • Protecting the server from slow HTTP attacks.
  • Handler module for handle Request.
  • The HTTP related types and functions.
  • hyper
  • logginglogging
    A simple logging middleware.
  • The macros lib of Savlo web framework.
  • A list of things that automatically imports into application use salvo.
  • Http protocol supports.
  • request_idrequest-id
    Request id middleware.
  • Routing and filters.
  • Runtime module.
  • Server module
  • size_limitersize-limiter
    Middleware for limiting request size.
  • ssesse
    Middleware for Server-Sent Events (SSE)
  • Utilities for testing application.
  • timeouttimeout
    Middleware for controlling requests timeout.
  • Tower service compat.
  • trailing_slashtrailing-slash
    Trailing slash middleware.
  • websocketwebsocket
    WebSocket implementation.
  • Writer trait and it’s implements.

Structs§

  • Depot is for store temp data of current request.
  • Control the flow of execute handlers.
  • Represents an HTTP request.
  • Represents an HTTP response.
  • Route request to different handlers.
  • HTTP Server.
  • Service http request.

Enums§

  • Errors that can happen inside salvo.

Traits§

Type Aliases§

  • BoxedError is a boxed error type that can be used as a trait object.
  • Result type which has salvo::Error as it’s error type.

Attribute Macros§

  • handler is a macro to help create Handler from function or impl block easily.