Trait ParallelizationContract

Source
pub trait ParallelizationContract<T, C> {
    type Pusher: Push<Message<T, C>> + 'static;
    type Puller: Pull<Message<T, C>> + 'static;

    // Required method
    fn connect<A: AsWorker>(
        self,
        allocator: &mut A,
        identifier: usize,
        address: Rc<[usize]>,
        logging: Option<Logger>,
    ) -> (Self::Pusher, Self::Puller);
}
Expand description

A ParallelizationContract allocates paired Push and Pull implementors.

Required Associated Types§

Source

type Pusher: Push<Message<T, C>> + 'static

Type implementing Push produced by this pact.

Source

type Puller: Pull<Message<T, C>> + 'static

Type implementing Pull produced by this pact.

Required Methods§

Source

fn connect<A: AsWorker>( self, allocator: &mut A, identifier: usize, address: Rc<[usize]>, logging: Option<Logger>, ) -> (Self::Pusher, Self::Puller)

Allocates a matched pair of push and pull endpoints implementing the pact.

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§

Source§

impl<T: 'static, C: Container + 'static> ParallelizationContract<T, C> for Pipeline

Source§

type Pusher = LogPusher<T, C, Pusher<Message<T, C>, Pusher<Message<T, C>>>>

Source§

type Puller = LogPuller<T, C, Puller<Message<T, C>, Puller<Message<T, C>>>>

Source§

impl<T: Timestamp, CB, H> ParallelizationContract<T, <CB as ContainerBuilder>::Container> for ExchangeCore<CB, H>
where CB: ContainerBuilder + for<'a> PushInto<<CB::Container as Container>::Item<'a>>, CB::Container: Data + Send + ContainerBytes, for<'a> H: FnMut(&<CB::Container as Container>::Item<'a>) -> u64 + 'static,