What's Changed
axum-template
now supports axum
0.6.X. See the Breaking changes and Migration guide sections for more information
Key
now implements AsRef<str>
Full Changelog: https://github.com/Altair-Bueno/axum-template/compare/v0.9.0...v0.10.0
Breaking changes
axum_template::engine::Engine
no longer implements axum::extract::FromRequest
axum_template::engine::Engine
no longer implements tower_layer::Layer
axum_template::engine::EngineRejection
has been removed
axum_template::Key
no longer implements axum::extract::FromRequest
Migration guide
We suggest reading the official axum
migration guide before attempting to migrate axum-template
Sharing the engine
axum-template
now uses the new typesafe State
extractor, meaning you will now need to provide a global state object instead of adding extension layers. For more information, see https://github.com/tokio-rs/axum/blob/main/axum/CHANGELOG.md#extractors.
- Handlebars example diff: https://github.com/Altair-Bueno/axum-template/commit/c7e1ebafd53b932d3b9d96ae8654552e85152ca2#diff-a42b4386779af4e085bd3796181a95c3f28f7c836a89f9151d67e589aa6defc6
- Minijinja example diff: https://github.com/Altair-Bueno/axum-template/commit/c7e1ebafd53b932d3b9d96ae8654552e85152ca2#diff-4a960f71cebe34d9372d0463ae1192d61c78bc59bcc9b1b0e0a25270f329d8ee
- Tera example diff: https://github.com/Altair-Bueno/axum-template/commit/c7e1ebafd53b932d3b9d96ae8654552e85152ca2#diff-8884d37db8b28f37b744b8e99c9882b4c8dfcf7790953958e14910b1f6fee087
Custom keys and custom engines
See the new axum::request::FromRequestParts
trait.
- Custom engine example diff: https://github.com/Altair-Bueno/axum-template/commit/c7e1ebafd53b932d3b9d96ae8654552e85152ca2#diff-cd9a67fbcfb915c9ce5133ca7f491277d3711b8da3457a4316c28e7a5ec7be19
- Custom key example diff: https://github.com/Altair-Bueno/axum-template/commit/c7e1ebafd53b932d3b9d96ae8654552e85152ca2#diff-206f6377aaa0e0335166dfccc5902fe123a0296fdd9f2551fadd6001063f0799
Source code(tar.gz)
Source code(zip)