pub struct BatchCollector { /* private fields */ }Expand description
Batch collector — the default sink. Collects all observations into a Vec.
Implementations§
Source§impl BatchCollector
impl BatchCollector
pub fn new(max_observations: usize) -> Self
pub fn into_observations(self) -> Vec<Observation>
Trait Implementations§
Source§impl ObservationSink for BatchCollector
impl ObservationSink for BatchCollector
Source§fn on_observation(&mut self, observation: &Observation) -> ControlFlow
fn on_observation(&mut self, observation: &Observation) -> ControlFlow
Called for each observation during execution. Read more
Source§fn on_complete(&mut self)
fn on_complete(&mut self)
Called when execution completes (normally or via halt).
Override to perform cleanup or final analysis.
Auto Trait Implementations§
impl Freeze for BatchCollector
impl RefUnwindSafe for BatchCollector
impl Send for BatchCollector
impl Sync for BatchCollector
impl Unpin for BatchCollector
impl UnsafeUnpin for BatchCollector
impl UnwindSafe for BatchCollector
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more