ComputeHandler

Trait ComputeHandler 

Source
pub trait ComputeHandler:
    Send
    + Sync
    + 'static {
    // Required method
    fn compute(
        &self,
        interest: &Interest,
    ) -> impl Future<Output = Result<Data, ComputeError>> + Send;
}
Expand description

A handler function registered for a name prefix.

Called when an Interest arrives at ComputeFace matching the prefix. The result is returned as a Data packet and cached in the engine CS.

Required Methods§

Source

fn compute( &self, interest: &Interest, ) -> impl Future<Output = Result<Data, ComputeError>> + Send

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§