pub struct SamplerPipeline { /* private fields */ }Expand description
Chains multiple samplers so each one’s output enriches the annotations available to the next.
Implementations§
Source§impl SamplerPipeline
impl SamplerPipeline
pub fn new() -> Self
Sourcepub fn with_stage(self, sampler: Box<dyn Sampler>) -> Self
pub fn with_stage(self, sampler: Box<dyn Sampler>) -> Self
Append a sampler stage to the pipeline.
Sourcepub fn run(
&self,
graph: &SourceCodeGraph,
) -> Result<(Vec<SampleResult>, AnnotationMap), SamplerError>
pub fn run( &self, graph: &SourceCodeGraph, ) -> Result<(Vec<SampleResult>, AnnotationMap), SamplerError>
Execute all stages in order, threading annotations forward. Returns the per-stage results and the accumulated annotation map.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for SamplerPipeline
impl !UnwindSafe for SamplerPipeline
impl Freeze for SamplerPipeline
impl Send for SamplerPipeline
impl Sync for SamplerPipeline
impl Unpin for SamplerPipeline
impl UnsafeUnpin for SamplerPipeline
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more