Trait int_compute::Factory [] [src]

pub trait Factory {
    fn create(
        self,
        logger: &Logger,
        handle: Handle,
        sender: UpdateSenderUnbounded
    ) -> Box<IntCompute>; }

A factory for a single type of internal computation.

This allows creating the computations in somewhat generic way.

Required Methods

Creates the corresponding computation.

params

  • logger: The logger for internal use of the computation. The factory should create a child logger with the correct name (eg. setting its context variable).
  • handle: The handle to a tokio reactor core. Most computations will not need to do anything asynchronous, but it is possible some of them might, therefore they can use it.
  • sender: The sink where the generated updates should be sent.

Implementors