pub trait AgentNodeService: Sized {
// Required methods
async fn post_block_info(
self,
context: Context,
info: SnarkOSBlockInfo,
) -> Result<(), ()>;
async fn post_status(
self,
context: Context,
status: SnarkOSStatus,
) -> Result<(), ()>;
// Provided method
fn serve(self) -> ServeAgentNodeService<Self> { ... }
}Required Methods§
async fn post_block_info( self, context: Context, info: SnarkOSBlockInfo, ) -> Result<(), ()>
async fn post_status( self, context: Context, status: SnarkOSStatus, ) -> Result<(), ()>
Provided Methods§
Sourcefn serve(self) -> ServeAgentNodeService<Self>
fn serve(self) -> ServeAgentNodeService<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.