This commit is contained in:
Adrian Heine 2021-12-26 00:07:34 +01:00
parent fb23353453
commit 426b531e4c
4 changed files with 28 additions and 13 deletions

View file

@ -147,13 +147,7 @@ impl<D> Resource for ServeCustom<D> {
}
#[derive(Debug, Hash, PartialEq, Eq)]
pub struct ServePhp<D, P, C>(
pub D,
pub P,
pub &'static str,
pub String,
pub C,
);
pub struct ServePhp<D, P, C>(pub D, pub P, pub &'static str, pub String, pub C);
impl<D, P, C> Resource for ServePhp<D, P, C> {
type Artifact = PathArtifact;
}
@ -319,7 +313,18 @@ default_resources!(
WordpressTranslation: WordpressTranslation<PathBuf>,
);
pub fn serve_php<D, P: Into<PathBuf>, C: Into<FpmPoolConfig>>(domain: D, path: P, root_filename: &'static str, nginx_config: impl Into<String>, pool_config: C) -> ServePhp<D, PathBuf, FpmPoolConfig> {
pub fn serve_php<D, P: Into<PathBuf>, C: Into<FpmPoolConfig>>(
domain: D,
path: P,
root_filename: &'static str,
nginx_config: impl Into<String>,
pool_config: C,
) -> ServePhp<D, PathBuf, FpmPoolConfig> {
ServePhp(
domain, path.into(), root_filename, nginx_config.into(), pool_config.into())
domain,
path.into(),
root_filename,
nginx_config.into(),
pool_config.into(),
)
}