pub struct PortableArchive { /* private fields */ }Expand description
A portable archive opened for reading.
Implementations§
Source§impl PortableArchive
impl PortableArchive
Sourcepub fn open(path: &Utf8Path) -> Result<Self, PortableArchiveReadError>
pub fn open(path: &Utf8Path) -> Result<Self, PortableArchiveReadError>
Opens a portable archive from a file path.
Validates the format and store versions on open to fail fast if the archive cannot be read by this version of nextest.
This method also handles “wrapper” archives: if the archive does not
contain manifest.json but contains exactly one .zip file, that inner
file is treated as the nextest portable archive. This supports GitHub
Actions artifact downloads, which wrap archives in an outer zip.
Sourcepub fn archive_path(&self) -> &Utf8Path
pub fn archive_path(&self) -> &Utf8Path
Returns the path to the archive file.
Sourcepub fn run_info(&self) -> RecordedRunInfo
pub fn run_info(&self) -> RecordedRunInfo
Returns run info extracted from the manifest.
Sourcepub fn read_run_log(
&mut self,
) -> Result<PortableArchiveRunLog, PortableArchiveReadError>
pub fn read_run_log( &mut self, ) -> Result<PortableArchiveRunLog, PortableArchiveReadError>
Reads the run log into memory and returns it as an owned struct.
The returned PortableArchiveRunLog can be used to iterate over events
independently of this archive, avoiding borrow conflicts with
open_store.
Sourcepub fn extract_outer_file_to_path(
&mut self,
file_name: &'static str,
output_path: &Utf8Path,
check_limit: bool,
) -> Result<ExtractOuterFileResult, PortableArchiveReadError>
pub fn extract_outer_file_to_path( &mut self, file_name: &'static str, output_path: &Utf8Path, check_limit: bool, ) -> Result<ExtractOuterFileResult, PortableArchiveReadError>
Extracts a file from the outer archive to a path, streaming directly.
This avoids loading the entire file into memory. The full file is always extracted regardless of size.
If check_limit is true, the result will indicate whether the file
exceeded MAX_MAX_OUTPUT_SIZE. This is informational only and does
not affect extraction.
Sourcepub fn open_store(
&mut self,
) -> Result<PortableStoreReader<'_>, PortableArchiveReadError>
pub fn open_store( &mut self, ) -> Result<PortableStoreReader<'_>, PortableArchiveReadError>
Opens the inner store.zip for reading.
The returned reader borrows from this archive and implements StoreReader.
Trait Implementations§
Source§impl Debug for PortableArchive
impl Debug for PortableArchive
Source§impl RunFilesExist for PortableArchive
impl RunFilesExist for PortableArchive
Source§fn store_zip_exists(&self) -> bool
fn store_zip_exists(&self) -> bool
store.zip exists.Source§fn run_log_exists(&self) -> bool
fn run_log_exists(&self) -> bool
run.log.zst exists.Auto Trait Implementations§
impl Freeze for PortableArchive
impl RefUnwindSafe for PortableArchive
impl Send for PortableArchive
impl Sync for PortableArchive
impl Unpin for PortableArchive
impl UnwindSafe for PortableArchive
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