Crate kvarn_extensions

source ·
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.
  • Mounts all extensions specified in Cargo.toml dependency declaration. The extensions listed below will always get included in your server after calling this function.
  • Creates a new Extensions and adds all enabled kvarn_extensions.

Type Aliases§

  • 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.