pub struct NoOpSampler;Expand description
A sampler that produces no artifacts — useful as a pipeline placeholder and for testing.
Trait Implementations§
Source§impl Sampler for NoOpSampler
impl Sampler for NoOpSampler
Source§fn compute(
&self,
_ctx: &SampleContext<'_>,
) -> Result<Option<Value>, SamplerError>
fn compute( &self, _ctx: &SampleContext<'_>, ) -> Result<Option<Value>, SamplerError>
Compute the artifact for a single node.
Return
Ok(None) to skip a node without error.Source§fn selector(&self) -> NodeSelector
fn selector(&self) -> NodeSelector
Which nodes this sampler operates on.
Source§fn sample(
&self,
graph: &SourceCodeGraph,
annotations: &AnnotationMap,
) -> Result<SampleResult, SamplerError>
fn sample( &self, graph: &SourceCodeGraph, annotations: &AnnotationMap, ) -> Result<SampleResult, SamplerError>
Run the full sampling pass over a graph. Read more
Auto Trait Implementations§
impl Freeze for NoOpSampler
impl RefUnwindSafe for NoOpSampler
impl Send for NoOpSampler
impl Sync for NoOpSampler
impl Unpin for NoOpSampler
impl UnsafeUnpin for NoOpSampler
impl UnwindSafe for NoOpSampler
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