confitdb 0.1.4

ConfitDB is an experimental, distributed, real-time database, giving full control on conflict resolution.
Documentation
use std::fmt;

#[derive(Debug, PartialEq, Eq, Clone)]
pub struct ServerError {
    pub upstream: String,
}

impl ServerError {
    pub fn new(upstream: &str) -> Self {
        ServerError {
            upstream: String::from(upstream),
        }
    }
}

impl fmt::Display for ServerError {
    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> std::fmt::Result {
        write!(f, "server error, upstream message: {}", self.upstream)
    }
}