Skip to main content

mount_api_with

Function mount_api_with 

Source
pub fn mount_api_with(
    rocket: Rocket<Build>,
    config_file: PathBuf,
    database_url: &str,
) -> Rocket<Build>
Expand description

Like mount_api, but with an explicit config-file path and database URL (tests target the test database and a temporary config file). Builds the connection pool and manages it alongside the URL, so background jobs open their own connection against the same database.