pub trait EthApiServer:
Sized
+ Send
+ Sync
+ 'static {
// Required methods
fn chain_id<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = RpcResult<U256>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_block_by_number<'life0, 'async_trait>(
&'life0 self,
block_number_or_tag: BlockNumberOrTag,
hydrated_transactions: bool,
) -> Pin<Box<dyn Future<Output = RpcResult<Block>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_block_by_hash<'life0, 'async_trait>(
&'life0 self,
block_hash: B256,
hydrated_transactions: bool,
) -> Pin<Box<dyn Future<Output = RpcResult<Block>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_balance<'life0, 'async_trait>(
&'life0 self,
address: Address,
block: BlockId,
) -> Pin<Box<dyn Future<Output = RpcResult<U256>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_code<'life0, 'async_trait>(
&'life0 self,
address: Address,
block: BlockId,
) -> Pin<Box<dyn Future<Output = RpcResult<Bytes>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_storage_at<'life0, 'async_trait>(
&'life0 self,
address: Address,
slot: U256,
block: BlockId,
) -> Pin<Box<dyn Future<Output = RpcResult<B256>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn call<'life0, 'async_trait>(
&'life0 self,
transaction: TransactionRequest,
block: BlockId,
) -> Pin<Box<dyn Future<Output = RpcResult<Bytes>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
// Provided method
fn into_rpc(self) -> RpcModule<Self> { ... }
}Expand description
Server trait implementation for the EthApi RPC API.
Required Methods§
fn chain_id<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = RpcResult<U256>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_block_by_number<'life0, 'async_trait>(
&'life0 self,
block_number_or_tag: BlockNumberOrTag,
hydrated_transactions: bool,
) -> Pin<Box<dyn Future<Output = RpcResult<Block>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_block_by_hash<'life0, 'async_trait>(
&'life0 self,
block_hash: B256,
hydrated_transactions: bool,
) -> Pin<Box<dyn Future<Output = RpcResult<Block>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_balance<'life0, 'async_trait>(
&'life0 self,
address: Address,
block: BlockId,
) -> Pin<Box<dyn Future<Output = RpcResult<U256>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_code<'life0, 'async_trait>(
&'life0 self,
address: Address,
block: BlockId,
) -> Pin<Box<dyn Future<Output = RpcResult<Bytes>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_storage_at<'life0, 'async_trait>(
&'life0 self,
address: Address,
slot: U256,
block: BlockId,
) -> Pin<Box<dyn Future<Output = RpcResult<B256>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn call<'life0, 'async_trait>(
&'life0 self,
transaction: TransactionRequest,
block: BlockId,
) -> Pin<Box<dyn Future<Output = RpcResult<Bytes>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Provided Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.