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<&Path>,
module: Kind
) -> PathSet
fn intersection_removing_matches( &self, needles: &mut Vec<&Path>, 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 PartialEq<PathSet> for PathSet
impl PartialEq<PathSet> for PathSet
source§impl PartialOrd<PathSet> for PathSet
impl PartialOrd<PathSet> for PathSet
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moreimpl Eq for PathSet
impl StructuralEq for PathSet
impl StructuralPartialEq for PathSet
Auto Trait Implementations§
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
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
: 24 bytesSuite
: 32 bytes