Skip to main content

BlackBoxDecoder

Trait BlackBoxDecoder 

Source
pub trait BlackBoxDecoder:
    Send
    + Sync
    + 'static {
    // Required methods
    fn get_capabilities<'life0, 'async_trait>(
        &'life0 self,
        request: Request<()>,
    ) -> Pin<Box<dyn Future<Output = Result<Response<DecoderCapabilities>, Status>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn decode<'life0, 'async_trait>(
        &'life0 self,
        request: Request<DecodingProblem>,
    ) -> Pin<Box<dyn Future<Output = Result<Response<ParityFactor>, Status>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn load_hypergraph<'life0, 'async_trait>(
        &'life0 self,
        request: Request<DecodingHypergraph>,
    ) -> Pin<Box<dyn Future<Output = Result<Response<LoadHypergraphResponse>, Status>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn decode_loaded<'life0, 'async_trait>(
        &'life0 self,
        request: Request<LoadedDecodingProblem>,
    ) -> Pin<Box<dyn Future<Output = Result<Response<ParityFactor>, Status>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn reset<'life0, 'async_trait>(
        &'life0 self,
        request: Request<ResetRequest>,
    ) -> Pin<Box<dyn Future<Output = Result<Response<()>, Status>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

Generated trait containing gRPC methods that should be implemented for use with BlackBoxDecoderServer.

Required Methods§

Source

fn get_capabilities<'life0, 'async_trait>( &'life0 self, request: Request<()>, ) -> Pin<Box<dyn Future<Output = Result<Response<DecoderCapabilities>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Report optional decoder features. Advertising multiple features means they may be used together.

Source

fn decode<'life0, 'async_trait>( &'life0 self, request: Request<DecodingProblem>, ) -> Pin<Box<dyn Future<Output = Result<Response<ParityFactor>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

calling this service is in general inefficient because it has to process the entire decoding hypergraph during runtime. Consider using preloaded decoder instances like the rpc interfaces followed

Source

fn load_hypergraph<'life0, 'async_trait>( &'life0 self, request: Request<DecodingHypergraph>, ) -> Pin<Box<dyn Future<Output = Result<Response<LoadHypergraphResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

load a decoding hypergraph into the decoder service so that the runtime decoding can simply decode using the existing instances

Source

fn decode_loaded<'life0, 'async_trait>( &'life0 self, request: Request<LoadedDecodingProblem>, ) -> Pin<Box<dyn Future<Output = Result<Response<ParityFactor>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

decode using a preloaded hypergraph instance

Source

fn reset<'life0, 'async_trait>( &'life0 self, request: Request<ResetRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<()>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

remove all loaded hypergraph instances

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§