pub fn mount_all(extensions: &mut Extensions)Expand description
Mounts all extensions specified in Cargo.toml dependency declaration. The extensions listed below will always get included in your server after calling this function.
The current defaults are:
download()(present namedownload)cache()(present namecache)hide()(present namehide&private)ip_allow()(present nameallow-ips)templates_ext()if the featuretemplatesis enabled (present nametmpl)push::mount()if the featurepushis enabled
To add PHP, use
php().
The push extension uses the default settings.
ยงExamples
use kvarn::prelude::*;
let mut extensions = Extensions::new();
kvarn_extensions::mount_all(&mut extensions);
let host = Host::unsecure("localhost", "web", Extensions::default(), host::Options::default());
let data = HostCollection::builder().insert(host).build();
let port_descriptor = PortDescriptor::new(8080, data);
let shutdown_manager = run_config![port_descriptor].execute().await;
shutdown_manager.wait().await;