[][src]Trait rettle::source::Source

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

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

Required methods

fn collect(
    &self,
    brewery: &Brewery,
    recipe: Arc<RwLock<Vec<Box<dyn Ingredient + 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

fn as_any(&self) -> &dyn Any

Used to convert Box to Any to unwrap Ingredient.

fn print(&self)

Print out current step information.

fn get_name(&self) -> &str

Returns name given to Ingredient.

fn get_source(&self) -> &str

Returns source given to Ingredient.

Loading content...

Implementors

impl Source for Fill[src]

Loading content...