|
@ -15,7 +15,7 @@ pub enum NginxServerError<E: Error> { |
|
|
}
|
|
|
}
|
|
|
|
|
|
|
|
|
impl From<io::Error> for NginxServerError<io::Error> {
|
|
|
impl From<io::Error> for NginxServerError<io::Error> {
|
|
|
fn from(err: io::Error) -> NginxServerError<io::Error> {
|
|
|
|
|
|
|
|
|
fn from(err: io::Error) -> Self {
|
|
|
NginxServerError::ExecError(err)
|
|
|
NginxServerError::ExecError(err)
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@ -23,8 +23,8 @@ impl From<io::Error> for NginxServerError<io::Error> { |
|
|
impl<E: Error> Error for NginxServerError<E> {
|
|
|
impl<E: Error> Error for NginxServerError<E> {
|
|
|
fn description(&self) -> &str {
|
|
|
fn description(&self) -> &str {
|
|
|
match self {
|
|
|
match self {
|
|
|
NginxServerError::ExecError(ref e) => e.description(),
|
|
|
|
|
|
NginxServerError::GenericError => "Generic error",
|
|
|
|
|
|
|
|
|
Self::ExecError(ref e) => e.description(),
|
|
|
|
|
|
Self::GenericError => "Generic error",
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
fn cause(&self) -> Option<&dyn Error> {
|
|
|
fn cause(&self) -> Option<&dyn Error> {
|
|
@ -75,7 +75,7 @@ server {{ |
|
|
)
|
|
|
)
|
|
|
}
|
|
|
}
|
|
|
|
|
|
|
|
|
pub fn php_server_config_snippet<'a, SOCKET: AsRef<Path>, STATIC: AsRef<Path>>(
|
|
|
|
|
|
|
|
|
pub fn php_server_config_snippet<SOCKET: AsRef<Path>, STATIC: AsRef<Path>>(
|
|
|
socket_path: SOCKET,
|
|
|
socket_path: SOCKET,
|
|
|
static_path: STATIC,
|
|
|
static_path: STATIC,
|
|
|
) -> String {
|
|
|
) -> String {
|
|
@ -109,7 +109,7 @@ pub struct LocalTcpSocket(usize); |
|
|
|
|
|
|
|
|
impl LocalTcpSocket {
|
|
|
impl LocalTcpSocket {
|
|
|
pub fn new(x: usize) -> Self {
|
|
|
pub fn new(x: usize) -> Self {
|
|
|
LocalTcpSocket(x)
|
|
|
|
|
|
|
|
|
Self(x)
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
|
|
|