pub trait Web3ApiServer:
Sized
+ Send
+ Sync
+ 'static {
// Required methods
fn client_version(
&self,
) -> impl Future<Output = Result<String, ErrorObject<'static>>> + Send;
fn sha3(&self, input: Bytes) -> Result<FixedBytes<32>, ErrorObject<'static>>;
// Provided method
fn into_rpc(self) -> RpcModule<Self> { ... }
}Expand description
Server trait implementation for the Web3Api RPC API.
Required Methods§
Sourcefn client_version(
&self,
) -> impl Future<Output = Result<String, ErrorObject<'static>>> + Send
fn client_version( &self, ) -> impl Future<Output = Result<String, ErrorObject<'static>>> + Send
Returns current client version.
Sourcefn sha3(&self, input: Bytes) -> Result<FixedBytes<32>, ErrorObject<'static>>
fn sha3(&self, input: Bytes) -> Result<FixedBytes<32>, ErrorObject<'static>>
Returns sha3 of the given data.
Provided Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementations on Foreign Types§
Source§impl<N> Web3ApiServer for Web3Api<N>where
N: NetworkInfo + 'static,
impl<N> Web3ApiServer for Web3Api<N>where
N: NetworkInfo + 'static,
Source§async fn client_version(&self) -> Result<String, ErrorObject<'static>>
async fn client_version(&self) -> Result<String, ErrorObject<'static>>
Handler for web3_clientVersion
Source§fn sha3(&self, input: Bytes) -> Result<FixedBytes<32>, ErrorObject<'static>>
fn sha3(&self, input: Bytes) -> Result<FixedBytes<32>, ErrorObject<'static>>
Handler for web3_sha3