AgentNodeService

Trait AgentNodeService 

Source
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§

Source

async fn post_block_info( self, context: Context, info: SnarkOSBlockInfo, ) -> Result<(), ()>

Source

async fn post_status( self, context: Context, status: SnarkOSStatus, ) -> Result<(), ()>

Provided Methods§

Source

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.

Implementors§