Skip to main content

Crate salvo_core

Crate salvo_core 

Source
Expand description

The core crate of Salvo web framework.

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

§Feature flags

FeatureDescriptionDefault?
cookieSupport for Cookie✔️
serverBuilt-in Server implementation✔️
http1Support for HTTP 1.1 protocol✔️
http2Support for HTTP 2 protocol✔️
http2-cleartextSupport for HTTP 2 over cleartext TCP
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
anyhowIntegrate with the anyhow crate
eyreIntegrate with the eyre crate
rfc9457RFC 9457 Problem Details responses

Re-exports§

pub use self::server::Server;server
pub use self::conn::ConnCtrl;
pub use self::conn::Listener;
pub use self::extract::Extractible;
pub use self::handler::Handler;
pub use self::http::Request;
pub use self::http::Response;
pub use self::routing::FlowCtrl;
pub use self::routing::Router;
pub use self::writing::Scribe;
pub use self::writing::Writer;
pub use hyper;
pub use salvo_macros as macros;

Modules§

catcher
Error catching and custom error page handling.
conn
Connection and listener implementations for handling HTTP connections.
extract
Request extraction for deserializing request data into application types.
fs
Filesystem utilities for serving files in HTTP responses.
fuse
Low-overhead protection against stalled and abusive connections.
handler
Handler abstractions for processing Request values.
http
HTTP types, request/response handling, and protocol utilities.
prelude
A list of things that automatically imports into application use salvo_core.
proto
Http protocol supports.
routing
Routing and filters.
rt
Runtime module.
serverserver
Server module
testtest
Utilities for testing application.
webtransportquinn
Provides the client and server support for WebTransport sessions.
writing
Writer trait and its implementations.

Structs§

Depot
Store temporary data for the current request.
Service
Service http request.

Enums§

Error
The main error type used throughout Salvo.

Type Aliases§

BoxedError
A boxed error type for dynamic error handling.
Result
Result type which has salvo::Error as its error type.

Attribute Macros§

async_trait
Re-export async_trait.
handler
Converts a function or impl block into a Salvo Handler.