Trait Producer

Source
pub trait Producer:
    Clone
    + Send
    + 'static {
    type Key: Array;

    // Required method
    fn produce(
        &mut self,
        key: Self::Key,
    ) -> impl Future<Output = Receiver<Bytes>> + Send;
}
Expand description

Serves data requested by the network.

Required Associated Types§

Source

type Key: Array

Type used to uniquely identify data.

Required Methods§

Source

fn produce( &mut self, key: Self::Key, ) -> impl Future<Output = Receiver<Bytes>> + Send

Serve a request received from the network.

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§