rings-rpc 0.12.0

Rings is a structured peer-to-peer network implementation using WebRTC, Chord algorithm, and full WebAssembly (WASM) support.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
/// A wrap `Result` contains custom errors.
pub type Result<T> = std::result::Result<T, Error>;

/// Errors enum mapping global custom errors.
#[derive(Debug, thiserror::Error)]
#[non_exhaustive]
pub enum Error {
    #[error("Invalid method.")]
    InvalidMethod,
    #[error("Rpc error: {0}")]
    RpcError(crate::jsonrpc::RpcError),
    #[error("Invalid signature.")]
    InvalidSignature,
    #[error("Invalid headers.")]
    InvalidHeaders,
}