pub enum PathSet {
Set(BTreeSet<TaskPath>),
Suite(TaskPath),
}
Expand description
Collection of paths used to match a task rule.
Variants§
Set(BTreeSet<TaskPath>)
A collection of individual paths or aliases.
These are generally matched as a path suffix. For example, a
command-line value of std
will match if library/std
is in the
set.
NOTE: the paths within a set should always be aliases of one another.
For example, src/librustdoc
and src/tools/rustdoc
should be in the same set,
but library/core
and library/std
generally should not, unless there’s no way (for that Step)
to build them separately.
Suite(TaskPath)
A “suite” of paths.
These can match as a path suffix (like Set
), or as a prefix. For
example, a command-line value of tests/ui/abi/variadic-ffi.rs
will match tests/ui
. A command-line value of ui
would also
match tests/ui
.
Implementations§
Source§impl PathSet
impl PathSet
fn empty() -> PathSet
fn one<P: Into<PathBuf>>(path: P, kind: Kind) -> PathSet
fn has(&self, needle: &Path, module: Kind) -> bool
fn check(p: &TaskPath, needle: &Path, module: Kind) -> bool
Sourcefn intersection_removing_matches(
&self,
needles: &mut Vec<PathBuf>,
module: Kind,
) -> PathSet
fn intersection_removing_matches( &self, needles: &mut Vec<PathBuf>, module: Kind, ) -> PathSet
Return all TaskPath
s in Self
that contain any of the needles
, removing the
matched needles.
This is used for StepDescription::krate
, which passes all matching crates at once to
Step::make_run
, rather than calling it many times with a single crate.
See tests.rs
for examples.
Sourcepub fn assert_single_path(&self) -> &TaskPath
pub fn assert_single_path(&self) -> &TaskPath
A convenience wrapper for Steps which know they have no aliases and all their sets contain only a single path.
This can be used with ShouldRun::crate_or_deps
, ShouldRun::path
, or ShouldRun::alias
.
Trait Implementations§
Source§impl Ord for PathSet
impl Ord for PathSet
Source§impl PartialOrd for PathSet
impl PartialOrd for PathSet
impl Eq for PathSet
impl StructuralPartialEq for PathSet
Auto Trait Implementations§
impl Freeze for PathSet
impl RefUnwindSafe for PathSet
impl Send for PathSet
impl Sync for PathSet
impl Unpin for PathSet
impl UnwindSafe for PathSet
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Pointable for T
impl<T> Pointable for T
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 32 bytes
Size for each variant:
Set
: 32 bytesSuite
: 32 bytes