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
| Feature | Description | Default? |
|---|---|---|
cookie | Support for Cookie | ✔️ |
server | Built-in Server implementation | ✔️ |
http1 | Support for HTTP 1.1 protocol | ✔️ |
http2 | Support for HTTP 2 protocol | ✔️ |
http2-cleartext | Support for HTTP 2 over cleartext TCP | ❌ |
quinn | Use quinn to support HTTP 3 protocol | ❌ |
test | Utilities for testing application | ✔️ |
acme | Automatically obtain certificates through ACME | ❌ |
rustls | TLS built on rustls | ❌ |
openssl | TLS built on openssl-tls | ❌ |
native-tls | TLS built on native-tls | ❌ |
unix | Listener based on Unix socket | ❌ |
anyhow | Integrate with the anyhow crate | ❌ |
eyre | Integrate with the eyre crate | ❌ |
Re-exports§
pub use self::server::Server;serverpub 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
- Catch and handle errors.
- conn
- Various listener implementations for handling HTTP connections.
- extract
- Extract is a feature to let you deserialize request to custom type.
- fs
- Filesystem module
- fuse
- Protecting the server from slow HTTP attacks.
- handler
- Handler module for handle
Request. - http
- The HTTP related types and functions.
- prelude
- A list of things that automatically imports into application use salvo_core.
- proto
- Http protocol supports.
- routing
- Routing and filters.
- rt
- Runtime module.
- server
server - Server module
- test
test - Utilities for testing application.
- webtransport
quinn - Provides the client and server support for WebTransport sessions.
- writing
- Writer trait and it’s implements.
Structs§
Enums§
- Error
- Errors that can happen inside salvo.
Type Aliases§
- Boxed
Error BoxedErroris a boxed error type that can be used as a trait object.- Result
- Result type which has
salvo::Erroras its error type.
Attribute Macros§
- async_
trait - Re-export
async_trait. - handler
handleris a macro to help createHandlerfrom function or impl block easily.