rstrpc 0.0.1

Type-safe framework for an JSONRPC server written in Rust with an automatically generated TypeScript client.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use jsonrpsee::types::ErrorObjectOwned;

pub trait FromContext<AppCtx>
where
    Self: Sized,
{
    fn from_app_ctx(ctx: AppCtx) -> Result<Self, ErrorObjectOwned>;
}

impl<Ctx> FromContext<Ctx> for Ctx {
    fn from_app_ctx(ctx: Ctx) -> Result<Self, ErrorObjectOwned> {
        Ok(ctx)
    }
}