pub struct RunStoreSnapshot { /* private fields */ }Expand description
A snapshot of run store data.
Implementations§
Source§impl RunStoreSnapshot
impl RunStoreSnapshot
Sourcepub fn runs_dir(&self) -> StoreRunsDir<'_>
pub fn runs_dir(&self) -> StoreRunsDir<'_>
Returns the runs directory.
Sourcepub fn write_permission(&self) -> RunsJsonWritePermission
pub fn write_permission(&self) -> RunsJsonWritePermission
Returns whether this nextest can write to the runs.json.zst file.
If the file has a newer format version than we support, writing is denied.
Sourcepub fn runs(&self) -> &[RecordedRunInfo]
pub fn runs(&self) -> &[RecordedRunInfo]
Returns a list of recorded runs.
Sourcepub fn total_size(&self) -> u64
pub fn total_size(&self) -> u64
Returns the total compressed size of all recorded runs in bytes.
Sourcepub fn resolve_run_id(
&self,
selector: &RunIdSelector,
) -> Result<ResolveRunIdResult, RunIdResolutionError>
pub fn resolve_run_id( &self, selector: &RunIdSelector, ) -> Result<ResolveRunIdResult, RunIdResolutionError>
Resolves a run ID selector to a run result.
For RunIdSelector::Latest, returns the most recent replayable run.
For RunIdSelector::Prefix, resolves the prefix to a specific run.
Returns a ResolveRunIdResult containing the run ID and, for
Latest, the count of newer incomplete runs that were skipped.
Sourcepub fn run_id_index(&self) -> &RunIdIndex
pub fn run_id_index(&self) -> &RunIdIndex
Returns the run ID index for computing shortest unique prefixes.
Sourcepub fn get_run(&self, run_id: ReportUuid) -> Option<&RecordedRunInfo>
pub fn get_run(&self, run_id: ReportUuid) -> Option<&RecordedRunInfo>
Looks up a run by its exact UUID.
Sourcepub fn most_recent_run(
&self,
replayability: Option<&HashMap<ReportUuid, ReplayabilityStatus>>,
) -> Result<ResolveRunIdResult, RunIdResolutionError>
pub fn most_recent_run( &self, replayability: Option<&HashMap<ReportUuid, ReplayabilityStatus>>, ) -> Result<ResolveRunIdResult, RunIdResolutionError>
Returns the most recent replayable run.
The first run (by start time, most recent first) that is definitely
replayable is returned. Replayability is checked via
RecordedRunInfo::check_replayability.
If there are newer runs that are not replayable, those are counted and returned in the result.
Returns an error if there are no runs at all, or if there are runs but none are replayable.
Sourcepub fn compute_prune_plan(&self, policy: &RecordRetentionPolicy) -> PrunePlan
pub fn compute_prune_plan(&self, policy: &RecordRetentionPolicy) -> PrunePlan
Computes which runs would be deleted by a prune operation.
This is used for dry-run mode to show what would be deleted without
actually deleting anything. Returns a PrunePlan containing the runs
that would be deleted, sorted by start time (oldest first).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for RunStoreSnapshot
impl RefUnwindSafe for RunStoreSnapshot
impl Send for RunStoreSnapshot
impl Sync for RunStoreSnapshot
impl Unpin for RunStoreSnapshot
impl UnwindSafe for RunStoreSnapshot
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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>
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>
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§impl<D> OwoColorize for D
impl<D> OwoColorize for D
§fn fg<C>(&self) -> FgColorDisplay<'_, C, Self>where
C: Color,
fn fg<C>(&self) -> FgColorDisplay<'_, C, Self>where
C: Color,
§fn bg<C>(&self) -> BgColorDisplay<'_, C, Self>where
C: Color,
fn bg<C>(&self) -> BgColorDisplay<'_, C, Self>where
C: Color,
§fn on_magenta(&self) -> BgColorDisplay<'_, Magenta, Self>
fn on_magenta(&self) -> BgColorDisplay<'_, Magenta, Self>
§fn default_color(&self) -> FgColorDisplay<'_, Default, Self>
fn default_color(&self) -> FgColorDisplay<'_, Default, Self>
§fn on_default_color(&self) -> BgColorDisplay<'_, Default, Self>
fn on_default_color(&self) -> BgColorDisplay<'_, Default, Self>
§fn bright_black(&self) -> FgColorDisplay<'_, BrightBlack, Self>
fn bright_black(&self) -> FgColorDisplay<'_, BrightBlack, Self>
§fn on_bright_black(&self) -> BgColorDisplay<'_, BrightBlack, Self>
fn on_bright_black(&self) -> BgColorDisplay<'_, BrightBlack, Self>
§fn bright_red(&self) -> FgColorDisplay<'_, BrightRed, Self>
fn bright_red(&self) -> FgColorDisplay<'_, BrightRed, Self>
§fn on_bright_red(&self) -> BgColorDisplay<'_, BrightRed, Self>
fn on_bright_red(&self) -> BgColorDisplay<'_, BrightRed, Self>
§fn bright_green(&self) -> FgColorDisplay<'_, BrightGreen, Self>
fn bright_green(&self) -> FgColorDisplay<'_, BrightGreen, Self>
§fn on_bright_green(&self) -> BgColorDisplay<'_, BrightGreen, Self>
fn on_bright_green(&self) -> BgColorDisplay<'_, BrightGreen, Self>
§fn bright_yellow(&self) -> FgColorDisplay<'_, BrightYellow, Self>
fn bright_yellow(&self) -> FgColorDisplay<'_, BrightYellow, Self>
§fn on_bright_yellow(&self) -> BgColorDisplay<'_, BrightYellow, Self>
fn on_bright_yellow(&self) -> BgColorDisplay<'_, BrightYellow, Self>
§fn bright_blue(&self) -> FgColorDisplay<'_, BrightBlue, Self>
fn bright_blue(&self) -> FgColorDisplay<'_, BrightBlue, Self>
§fn on_bright_blue(&self) -> BgColorDisplay<'_, BrightBlue, Self>
fn on_bright_blue(&self) -> BgColorDisplay<'_, BrightBlue, Self>
§fn bright_magenta(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
fn bright_magenta(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
§fn on_bright_magenta(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
fn on_bright_magenta(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
§fn bright_purple(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
fn bright_purple(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
§fn on_bright_purple(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
fn on_bright_purple(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
§fn bright_cyan(&self) -> FgColorDisplay<'_, BrightCyan, Self>
fn bright_cyan(&self) -> FgColorDisplay<'_, BrightCyan, Self>
§fn on_bright_cyan(&self) -> BgColorDisplay<'_, BrightCyan, Self>
fn on_bright_cyan(&self) -> BgColorDisplay<'_, BrightCyan, Self>
§fn bright_white(&self) -> FgColorDisplay<'_, BrightWhite, Self>
fn bright_white(&self) -> FgColorDisplay<'_, BrightWhite, Self>
§fn on_bright_white(&self) -> BgColorDisplay<'_, BrightWhite, Self>
fn on_bright_white(&self) -> BgColorDisplay<'_, BrightWhite, Self>
§fn blink_fast(&self) -> BlinkFastDisplay<'_, Self>
fn blink_fast(&self) -> BlinkFastDisplay<'_, Self>
§fn strikethrough(&self) -> StrikeThroughDisplay<'_, Self>
fn strikethrough(&self) -> StrikeThroughDisplay<'_, Self>
§fn color<Color>(&self, color: Color) -> FgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
fn color<Color>(&self, color: Color) -> FgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
OwoColorize::fg] or
a color-specific method, such as [OwoColorize::green], Read more§fn on_color<Color>(&self, color: Color) -> BgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
fn on_color<Color>(&self, color: Color) -> BgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
OwoColorize::bg] or
a color-specific method, such as [OwoColorize::on_yellow], Read more