pub trait HeaderRpcServer:
Sized
+ Send
+ Sync
+ 'static {
// Required methods
fn header_get_by_hash<'life0, 'async_trait>(
&'life0 self,
hash: Hash,
) -> Pin<Box<dyn Future<Output = RpcResult<ExtendedHeader>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn header_get_by_height<'life0, 'async_trait>(
&'life0 self,
height: u64,
) -> Pin<Box<dyn Future<Output = RpcResult<ExtendedHeader>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn header_get_range_by_height<'life0, 'async_trait>(
&'life0 self,
from: ExtendedHeader,
to: u64,
) -> Pin<Box<dyn Future<Output = RpcResult<Vec<ExtendedHeader>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn header_local_head<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = RpcResult<ExtendedHeader>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn header_network_head<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = RpcResult<ExtendedHeader>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn header_sync_state<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = RpcResult<SyncState>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn header_sync_wait<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = RpcResult<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn header_wait_for_height<'life0, 'async_trait>(
&'life0 self,
height: u64,
) -> Pin<Box<dyn Future<Output = RpcResult<ExtendedHeader>> + 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 Header RPC API.
Required Methods§
Sourcefn header_get_by_hash<'life0, 'async_trait>(
&'life0 self,
hash: Hash,
) -> Pin<Box<dyn Future<Output = RpcResult<ExtendedHeader>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn header_get_by_hash<'life0, 'async_trait>(
&'life0 self,
hash: Hash,
) -> Pin<Box<dyn Future<Output = RpcResult<ExtendedHeader>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Sourcefn header_get_by_height<'life0, 'async_trait>(
&'life0 self,
height: u64,
) -> Pin<Box<dyn Future<Output = RpcResult<ExtendedHeader>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn header_get_by_height<'life0, 'async_trait>(
&'life0 self,
height: u64,
) -> Pin<Box<dyn Future<Output = RpcResult<ExtendedHeader>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Sourcefn header_get_range_by_height<'life0, 'async_trait>(
&'life0 self,
from: ExtendedHeader,
to: u64,
) -> Pin<Box<dyn Future<Output = RpcResult<Vec<ExtendedHeader>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn header_get_range_by_height<'life0, 'async_trait>(
&'life0 self,
from: ExtendedHeader,
to: u64,
) -> Pin<Box<dyn Future<Output = RpcResult<Vec<ExtendedHeader>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Sourcefn header_local_head<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = RpcResult<ExtendedHeader>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn header_local_head<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = RpcResult<ExtendedHeader>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Sourcefn header_network_head<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = RpcResult<ExtendedHeader>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn header_network_head<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = RpcResult<ExtendedHeader>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Sourcefn header_sync_state<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = RpcResult<SyncState>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn header_sync_state<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = RpcResult<SyncState>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Sourcefn header_sync_wait<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = RpcResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn header_sync_wait<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = RpcResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Sourcefn header_wait_for_height<'life0, 'async_trait>(
&'life0 self,
height: u64,
) -> Pin<Box<dyn Future<Output = RpcResult<ExtendedHeader>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn header_wait_for_height<'life0, 'async_trait>(
&'life0 self,
height: u64,
) -> Pin<Box<dyn Future<Output = RpcResult<ExtendedHeader>> + 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.