roadster 0.9.0-alpha.5

A "Batteries Included" web framework for rust designed to get you moving fast.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use crate::error::Error;
use std::borrow::Cow;

#[derive(Debug, Error)]
#[non_exhaustive]
pub enum OtherError {
    #[error("{0}")]
    Message(Cow<'static, str>),

    #[error(transparent)]
    Other(#[from] Box<dyn Send + Sync + std::error::Error>),
}

impl From<Box<dyn Send + Sync + std::error::Error>> for Error {
    fn from(value: Box<dyn Send + Sync + std::error::Error>) -> Self {
        Self::Other(OtherError::from(value))
    }
}