pub trait NitroExecutionApiServer:
Sized
+ Send
+ Sync
+ 'static {
// Required methods
fn digest_message<'life0, 'async_trait>(
&'life0 self,
msg_idx: u64,
message: RpcMessageWithMetadata,
message_for_prefetch: Option<RpcMessageWithMetadata>,
) -> Pin<Box<dyn Future<Output = RpcResult<RpcMessageResult>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn reorg<'life0, 'async_trait>(
&'life0 self,
msg_idx_of_first_msg_to_add: u64,
new_messages: Vec<RpcMessageWithMetadataAndBlockInfo>,
old_messages: Vec<RpcMessageWithMetadata>,
) -> Pin<Box<dyn Future<Output = RpcResult<Vec<RpcMessageResult>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn head_message_index<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = RpcResult<u64>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn result_at_message_index<'life0, 'async_trait>(
&'life0 self,
msg_idx: u64,
) -> Pin<Box<dyn Future<Output = RpcResult<RpcMessageResult>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn set_finality_data(
&self,
safe: Option<RpcFinalityData>,
finalized: Option<RpcFinalityData>,
validated: Option<RpcFinalityData>,
) -> RpcResult<()>;
fn set_consensus_sync_data(
&self,
sync_data: RpcConsensusSyncData,
) -> RpcResult<()>;
fn mark_feed_start(&self, to: u64) -> RpcResult<()>;
fn trigger_maintenance<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = RpcResult<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn should_trigger_maintenance<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = RpcResult<bool>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn maintenance_status<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = RpcResult<RpcMaintenanceStatus>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn arbos_version_for_message_index<'life0, 'async_trait>(
&'life0 self,
msg_idx: u64,
) -> Pin<Box<dyn Future<Output = RpcResult<u64>> + 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 NitroExecutionApi RPC API.
Required Methods§
Sourcefn digest_message<'life0, 'async_trait>(
&'life0 self,
msg_idx: u64,
message: RpcMessageWithMetadata,
message_for_prefetch: Option<RpcMessageWithMetadata>,
) -> Pin<Box<dyn Future<Output = RpcResult<RpcMessageResult>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn digest_message<'life0, 'async_trait>(
&'life0 self,
msg_idx: u64,
message: RpcMessageWithMetadata,
message_for_prefetch: Option<RpcMessageWithMetadata>,
) -> Pin<Box<dyn Future<Output = RpcResult<RpcMessageResult>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Process a message and produce a block.
Sourcefn reorg<'life0, 'async_trait>(
&'life0 self,
msg_idx_of_first_msg_to_add: u64,
new_messages: Vec<RpcMessageWithMetadataAndBlockInfo>,
old_messages: Vec<RpcMessageWithMetadata>,
) -> Pin<Box<dyn Future<Output = RpcResult<Vec<RpcMessageResult>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn reorg<'life0, 'async_trait>(
&'life0 self,
msg_idx_of_first_msg_to_add: u64,
new_messages: Vec<RpcMessageWithMetadataAndBlockInfo>,
old_messages: Vec<RpcMessageWithMetadata>,
) -> Pin<Box<dyn Future<Output = RpcResult<Vec<RpcMessageResult>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Handle a chain reorg by rolling back and replaying messages.
Sourcefn head_message_index<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = RpcResult<u64>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn head_message_index<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = RpcResult<u64>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Returns the current head message index.
Sourcefn result_at_message_index<'life0, 'async_trait>(
&'life0 self,
msg_idx: u64,
) -> Pin<Box<dyn Future<Output = RpcResult<RpcMessageResult>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn result_at_message_index<'life0, 'async_trait>(
&'life0 self,
msg_idx: u64,
) -> Pin<Box<dyn Future<Output = RpcResult<RpcMessageResult>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Returns the block hash and send root for a given message index.
Sourcefn set_finality_data(
&self,
safe: Option<RpcFinalityData>,
finalized: Option<RpcFinalityData>,
validated: Option<RpcFinalityData>,
) -> RpcResult<()>
fn set_finality_data( &self, safe: Option<RpcFinalityData>, finalized: Option<RpcFinalityData>, validated: Option<RpcFinalityData>, ) -> RpcResult<()>
Updates finality information.
Sourcefn set_consensus_sync_data(
&self,
sync_data: RpcConsensusSyncData,
) -> RpcResult<()>
fn set_consensus_sync_data( &self, sync_data: RpcConsensusSyncData, ) -> RpcResult<()>
Updates consensus sync data.
Sourcefn mark_feed_start(&self, to: u64) -> RpcResult<()>
fn mark_feed_start(&self, to: u64) -> RpcResult<()>
Marks the feed start position.
Sourcefn trigger_maintenance<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = RpcResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn trigger_maintenance<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = RpcResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Triggers maintenance operations.
Sourcefn should_trigger_maintenance<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = RpcResult<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn should_trigger_maintenance<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = RpcResult<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Checks if maintenance should be triggered.
Sourcefn maintenance_status<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = RpcResult<RpcMaintenanceStatus>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn maintenance_status<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = RpcResult<RpcMaintenanceStatus>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Returns current maintenance status.
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.