Struct pipelines::PipelineConfig
[−]
[src]
pub struct PipelineConfig { /* fields omitted */ }
Configuration for buffers internal to the Pipeline
Each stage inherits the configuration from its previous state. As a result, this configures future stages, not past
Example
use pipelines::{Pipeline, PipelineConfig}; let nums: Vec<u64> = (0..10).collect(); let fibs: Vec<u64> = Pipeline::from(nums) .configure(PipelineConfig::default().buff_size(10)) .map(|x| x*2) // *this* stage has its send buffer set to 10 .into_iter().collect();
Methods
impl PipelineConfig
[src]
fn buff_size(self, buff_size: usize) -> Self
[src]
Set the size of the internal mpsc buffer.
This can affect the effective parallelism and the length of the backlog between stages when different stages of the pipeline take different amounts of time
fn batch_size(self, batch_size: usize) -> Self
[src]
Set the size of each batch of messages sent
This tunes how much overhead is spent on synchronisation
Trait Implementations
impl Debug for PipelineConfig
[src]
impl Copy for PipelineConfig
[src]
impl Clone for PipelineConfig
[src]
fn clone(&self) -> PipelineConfig
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more