Struct xtest_data::Vcs[][src]

pub struct Vcs<'paths> { /* fields omitted */ }
Expand description

A builder for test data.

On a VCS copy of the surrounding package this will simply collect and validate the information. However, when executed in an unpacked .crate then, instead, we provide a detailed report of necessary data before we abort.

Implementations

Register some paths to rewrite to their location.

The paths will be registered internally. If the repository is local they will be rewritten to be relative to the manifest location. If the repository is a crate distribution then the paths will be sparsely checked out (meaning: only that path will be downloaded from the VCS working dir and you can’t expect any other files to be present).

Both of those actions will happen when you call [build()].

Register the path of a file.

The return value is a key that can later be used in FsData.

Run the final validation and return the frozen dictionary of file data.

Panics

This will panic if:

  • Any registered file or tree is not tracked in the VCS.
  • You have not allowed retrieving data from the VCS.
  • It was not possible to retrieve the data from the VCS.

Trait Implementations

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.