Expand description
A list of things that automatically imports into application use salvo.
Modules
- affix
affix
affix middleware is used to add any data to depot. - endpoint
oapi
endpoint module Handler
is used for handleRequest
.- trailing_slash
trailing-slash
Trailing slash middleware
Structs
- A wrapper around an underlying listener which implements the ACME.
- BasicAuth
basic-auth
BasicAuth - CachingHeaders
caching-headers
- CatchPanic
catch-panic
This middleware catches panics and write500 INTERNAL SERVER ERROR
into response. This middleware should be used as the first middleware. - Compression
compression
Compression - Depot is for store temp data of current request. Each handler can read or write data to it.
FlowCtrl
is used to control the flow of execute handlers.- ForceHttps
force-https
Middleware for force redirect to http uri. - JoinedListener
- Write serializable content to response as json content. It will set
content-type
toapplication/json; charset=utf-8
. - JwtAuth
jwt-auth
JwtAuth, used as middleware. - Logger
logging
A simple logger middleware. - NativeTlsListener
- OpenApi
oapi
Root object of the OpenAPI document. - OpensslListener
- Proxy
proxy
Proxy - QuinnListener
- RapiDoc
oapi
ImplementsHandler
for serving RapiDoc. - ReDoc
oapi
ImplementsHandler
for serving ReDoc. - Response that redirects the request to another location.
- Represents an HTTP request.
- Represents an HTTP response
- Router struct is used for route request to different handlers.
- RustlsListener
- HTTP Server
- Service http request.
- SessionHandler
session
SessionHandler - SseEvent
sse
Server-sent event - SseKeepAlive
sse
SseKeepAlive - StaticDir
serve-static
StaticDir - StaticFile
serve-static
StaticFile - An HTTP status code (
status-code
in RFC 7230 et al.). - StatusError contains http error information.
- SwaggerUi
oapi
ImplementsHandler
for serving Swagger UI. - TcpListener
- Timeout
timeout
Timeout - TrailingSlash
trailing-slash
TrailingSlash - Unix domain socket listener.
- WebSocketUpgrade
websocket
Creates a WebSocket Handler. Request:
Enums
- CompressionAlgo
compression
CompressionAlgo - CompressionLevel
compression
Level of compression data should be compressed with. - JwtAuthState
jwt-auth
JwtAuthState - Write text content to response as text content.
- TrailingSlashAction
trailing-slash
TrailingSlashAction
Traits
- BasicAuthDepotExt
basic-auth
BasicAuthDepotExt - BasicAuthValidator
basic-auth
BasicAuthValidator - CsrfDepotExt
csrf
Extesion for Depot. - A trait for endpoint argument register.
- A trait for endpoint return type register.
- Handler
- JwtAuthDepotExt
jwt-auth
JwtAuthDepotExt - Listener trait
Piece
is used to write data toResponse
.- SessionDepotExt
session
SessionDepotExt - SessionStore
session
An async session backend. - ToResponse
oapi
This trait is implemented to document a type which represents a single response which can be referenced or reused as a component in multiple operations. - ToResponses
oapi
This trait is implemented to document a type (like an enum) which can represent multiple responses, to be used in operation. - ToSchema
oapi
Trait for implementing OpenAPI Schema object. Writer
is a trait allows you to implement custom writing logic for different data types.
Functions
- max_concurrency
concurrency-limiter
Create a newMaxConcurrency
. - max_size
size-limiter
Create a newMaxSize
.
Attribute Macros
- endpoint
oapi
handler
is a macro to help createHandler
from function or impl block easily.
Derive Macros
- Generate code for extractible type.
- ToResponse
oapi
- ToResponses
oapi
- ToSchema
oapi