pub trait NodeService: Sized {
// Required methods
async fn status(self, context: Context) -> Result<(), AgentError>;
async fn set_log_level(
self,
context: Context,
verbosity: u8,
) -> Result<(), AgentError>;
async fn get_block_lite(
self,
context: Context,
block_hash: String,
) -> Result<Option<SnarkOSLiteBlock>, AgentError>;
async fn find_transaction(
self,
context: Context,
tx_id: String,
) -> Result<Option<String>, AgentError>;
// Provided method
fn serve(self) -> ServeNodeService<Self> { ... }
}Required Methods§
async fn status(self, context: Context) -> Result<(), AgentError>
async fn set_log_level( self, context: Context, verbosity: u8, ) -> Result<(), AgentError>
async fn get_block_lite( self, context: Context, block_hash: String, ) -> Result<Option<SnarkOSLiteBlock>, AgentError>
async fn find_transaction( self, context: Context, tx_id: String, ) -> Result<Option<String>, AgentError>
Provided Methods§
Sourcefn serve(self) -> ServeNodeService<Self>
fn serve(self) -> ServeNodeService<Self>
Returns a serving function to use with InFlightRequest::execute.
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.