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§
Sourcefn collect(
&self,
brewery: &Brewery,
recipe: Arc<RwLock<Vec<Box<dyn Ingredient<T> + Send + Sync>>>>,
)
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 Tearecipe
- clone of recipe to pass to Brewery
Sourcefn get_source(&self) -> &str
fn get_source(&self) -> &str
Returns source given to Ingredient.