Crate kvarn_extensions[−][src]
Expand description
Kvarn extensions
A supporter-lib for Kvarn to supply extensions to the web server.
Use new()
to get started quickly.
An introduction to the Kvarn extension system
On of the many things Kvarn extensions can to is bind to extension declarations and to file extensions.
For example, if you mount the extensions download
, it binds the extension declaration download
.
If you then, in a file inside your public/
directory, add !> download
to the top, the client visiting the url pointing to the file will download it.
Re-exports
Modules
Functions
Makes the client download the file.
Forces the responses matching rules
to be cached according to their respective preference.
Useful when you have compiled away cache, but still want images and fonts to be cached.
Mounts all extensions specified in Cargo.toml dependency declaration.
Creates a new Extensions
and adds all enabled kvarn_extensions
.