m_server 0.1.2-alpha

A minimal HTTP server framework. ALPHA: NOT READY FOR PRODUCTION!
Documentation
pub mod server;
pub mod router;
pub mod http {
    pub mod request;
    pub mod response;
}

mod logger;

#[derive(Clone)]
pub enum LineOrError {
    Line(String),
    Error(String),
}

impl std::fmt::Debug for LineOrError {
    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
        match self {
            LineOrError::Line(line) => write!(f, "{}", line),
            LineOrError::Error(err) => write!(f, "{}", err),
        }
    }
}

impl std::fmt::Display for LineOrError {
    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
        write!(f, "{:?}", self)
    }
}