pub struct ProbeSpec {
pub id: &'static str,
pub subject: Subject,
pub results: usize,
pub always: bool,
pub run: for<'a> fn(&'a Ctx) -> ProbeFuture<'a>,
}Expand description
One entry in the suite.
A step may emit several ProbeResults — identity alone produces seven —
so the unit of selection is coarser than the unit of reporting. That is
deliberate: the multi-result steps share state and sampling between their
parts, and letting a caller pick half of one would silently change what the
other half means.
Fields§
§id: &'static strStable across releases. Callers persist these, filter on them, and localise labels from them, so renaming one is a breaking change.
subject: Subject§results: usizeHow many results this step contributes, for progress totals. Steps whose output depends on what earlier steps observed report their maximum.
always: boolRuns regardless of the caller’s subject filter, because the rest of the suite is meaningless without it.
run: for<'a> fn(&'a Ctx) -> ProbeFuture<'a>Auto Trait Implementations§
impl Freeze for ProbeSpec
impl RefUnwindSafe for ProbeSpec
impl Send for ProbeSpec
impl Sync for ProbeSpec
impl Unpin for ProbeSpec
impl UnsafeUnpin for ProbeSpec
impl UnwindSafe for ProbeSpec
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