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.
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
Compression
compression
Compression
Cors
cors
Cors
Csrf
csrf
Cross-Site Request Forgery (CSRF) protection middleware.
Depot if 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
to application/json; charset=utf-8
.JwtAuth
jwt-auth
JwtAuth, used as middleware.
Wrapper for Extractible type. [
Handler
]’s parameters does not allow two extractible types has lifetime, wrap these types with LazyExtract
.Logger
logging
Logger
NativeTlsListener
OpensslListener
Proxy
proxy
Proxy
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.
SseEvent
sse
Server-sent event
SseKeepAlive
sse
SseKeepAlive
StaticDir
serve-static
StaticDir
StaticEmbed
serve-static
Serve static embed assets.
StaticFile
serve-static
StaticFile
An HTTP status code (
status-code
in RFC 7230 et al.).StatusError contains http error information.
TcpListener
Timeout
timeout
Timeout
TrailingSlash
trailing-slash
TrailingSlash
Unix domain socket listener.
Creates a WebSocket Handler.
Request:
Enums
CompressionAlgo
compression
CompressionAlgo
Write text content to response as text content.
TrailingSlashAction
trailing-slash
TrailingSlashAction
Traits
BasicAuthDepotExt
basic-auth
BasicAuthDepotExt
BasicAuthValidator
basic-auth
BasicAuthValidator
CsrfDepotExt
csrf
Provides access to request-level CSRF values.
EmbeddedFileExt
serve-static
Extension trait for [
EmbeddedFile
].JwtAuthDepotExt
jwt-auth
JwtAuthDepotExt
Listener trait
Writer is used to write data to response.
Functions
max_size
size-limiter
Create a new
MaxSize
.render_embedded_file
serve-static
Render [
EmbeddedFile
] to Response
.static_embed
serve-static
Create a new
StaticEmbed
middleware.Attribute Macros
handler
is a pro macro to help create Handler
from function or impl block easily.Derive Macros
Generate code for extractible type.