Function witchcraft_server::init

source ·
pub fn init<I, R, F>(init: F)where
    I: AsRef<InstallConfig> + DeserializeOwned,
    R: AsRef<RuntimeConfig> + DeserializeOwned + PartialEq + 'static + Sync + Send,
    F: FnOnce(I, Refreshable<R, Error>, &mut Witchcraft) -> Result<(), Error>,
Expand description

Initializes a Witchcraft server.

init is invoked with the parsed install and runtime configs as well as the Witchcraft context object. It is expected to return quickly; any long running initialization should be spawned off into the background to run asynchronously.