jsonrpce 0.1.0

JSON-RPC 2.0 for Rust
Documentation
use std::collections::HashMap;

mod memory;
mod stdio;
mod stream;

pub use memory::InMemory;
pub use stdio::Stdio;
pub use stream::BoxedHandler;
pub use stream::Stream;

// Abstract over the handler type (e.g. Sync vs Async)
pub trait Transport<C> {
    type Handler;
    type Output;
    type Error;

    fn serve(
        self,
        ctx: C,
        handlers: HashMap<String, Self::Handler>,
    ) -> Result<Self::Output, Self::Error>;
}