sui_indexer_alt_jsonrpc/api/rpc_module.rs
1// Copyright (c) Mysten Labs, Inc.
2// SPDX-License-Identifier: Apache-2.0
3
4/// A JSONRPC module implementation coupled with a description of its schema.
5pub trait RpcModule: Sized {
6 /// Docs to add to the schema usually generated by the `open_rpc` macro.
7 fn schema(&self) -> sui_open_rpc::Module;
8
9 /// The implementation of the JSONRPC module.
10 fn into_impl(self) -> jsonrpsee::RpcModule<Self>;
11}