Trait Source

Source
pub trait Source<T: Send> {
    // Required methods
    fn collect(
        &self,
        brewery: &Brewery,
        recipe: Arc<RwLock<Vec<Box<dyn Ingredient<T> + Send + Sync>>>>,
    );
    fn as_any(&self) -> &dyn Any;
    fn print(&self);
    fn get_name(&self) -> &str;
    fn get_source(&self) -> &str;
}
Expand description

Trait given to Box elements added to Pot for pulling in raw data.

Required Methods§

Source

fn collect( &self, brewery: &Brewery, recipe: Arc<RwLock<Vec<Box<dyn Ingredient<T> + Send + Sync>>>>, )

Runs the Fill computation to collect Tea in batches and send to the Brewery for processing.

§Arguments
  • brewery - Brewery that sends job to process Tea
  • recipe - clone of recipe to pass to Brewery
Source

fn as_any(&self) -> &dyn Any

Used to convert Box to Any to unwrap Ingredient.

Source

fn print(&self)

Print out current step information.

Source

fn get_name(&self) -> &str

Returns name given to Ingredient.

Source

fn get_source(&self) -> &str

Returns source given to Ingredient.

Implementors§

Source§

impl<T: Send + 'static> Source<T> for Fill<T>