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.FlowCtrl
is used to control the flow of execute handlers.- ForceHttps
force-https
Middleware for force redirect to http uri. JoinedListener
is a listener that can join two listeners.- 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
Handler that can proxy request to other server. - A wrapper of
Listener
with quinn. - RapiDoc
oapi
ImplementsHandler
for serving RapiDoc. - ReDoc
oapi
ImplementsHandler
for serving ReDoc. - Response that redirects the request to another location.
- Represents an HTTP request.
- RequestId
request-id
A middleware for generate request id. - Represents an HTTP response
- Router struct is used for route request to different handlers.
- A wrapper of
Listener
with rustls. - HTTP Server
- Service http request.
- SessionHandler
session
SessionHandler
is a middleware for session. - SseEvent
sse
Server-sent event - SseKeepAlive
sse
SseKeepAlive - StaticDir
serve-static
Handler that serves a directory. - StaticFile
serve-static
StaticFile
is a handler that serves a single file. - An HTTP status code (
status-code
in RFC 7230 et al.). - StatusError contains http error information.
- SwaggerUi
oapi
ImplementsHandler
for serving Swagger UI. TcpListener
is used to create a TCP connection listener.- Timeout
timeout
Timeout - TrailingSlash
trailing-slash
TrailingSlash UnixListener
is used to create a Unix socket connection 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
represents a listener that can bind to a specific address and port and return an acceptor.Scribe
is used to write data toResponse
.- SessionDepotExt
session
Trait forDepot
to get and set session. - 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. - Trait for tower layer compat.
- Trait for tower service compat.
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