mirror of
https://github.com/tokio-rs/axum.git
synced 2026-08-14 00:00:15 +02:00
This changes error model to actually allow errors. I think if we're going to use this for things like tonic's route we need a more flexible error handling model. The same `handle_error` adaptors are still there but services aren't required to have `Infallible` as their error type. The error type is simply propagated all the way through.
Examples
hello_world- Very small getting started app.key_value_store- Slightly larger app with an in-memory key/value store.form- Receiving data from an HTML<form>.static_file_server- Serving static files from a directory. Could for example be the baseline for a single page app.templates- Rending HTML templates using askama.testing- How to test awebframework apps.versioning- How one might version an API.websocket- How to build an app that handles WebSocket connections.error_handling_and_dependency_injection- How to handle errors and dependency injection using trait objects.tokio_postgres- How to use a tokio-postgres and bb8 to query a database.