Enum MatchMethod Copy item path Source #[non_exhaustive]
pub enum MatchMethod {
Manifest,
RegistryPath,
BuildDirectory,
CrateName,
Directory,
Features,
StartOrder,
SoleCandidate,
}Expand description How a unit’s two halves were recognised as the same unit, in decreasing order of certainty.
Exposed because it is the honest answer to “how much do you trust this graph”: a build whose
units were all matched by Manifest or
RegistryPath was identified exactly, and one that needed
StartOrder was not.
This enum is marked as non-exhaustive Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
The source path lay under a package’s manifest directory, per cargo metadata. Exact.
The source path contained name-version/, as a registry or git checkout does. Exact.
The unit is a build script, and Cargo gives every build script a
target/<profile>/build/<package>-<hash> directory. Exact.
The --crate-name matched a package or target name. Right unless a target was renamed.
The crate’s own directory name matched a package name. A heuristic; a package need not be
named after its directory.
Several candidates shared a name and version, and exactly one had the same feature set.
Several candidates were indistinguishable, so they were paired in the order each side lists
them. They differ only in weight, since everything else about them is identical.
Exactly one unit of this kind was left unmatched on each side.
A short stable name, for diagnostics.
Whether this method identified the unit rather than deduced it.
Performs copy-assignment from
source.
Read more Formats the value using the given formatter.
Read more Compares and returns the maximum of two values.
Read more Compares and returns the minimum of two values.
Read more Restrict a value to a certain interval.
Read more 🔬 This is a nightly-only experimental API. (clamp_to)
Restrict a value to a certain range.
Read more This method returns an ordering between
self and
other values if one exists.
Read more Tests less than (for
self and
other) and is used by the
< operator.
Read more Tests less than or equal to (for
self and
other) and is used by the
<= operator.
Read more Tests greater than (for
self and
other) and is used by the
>
operator.
Read more Tests greater than or equal to (for
self and
other) and is used by
the
>= operator.
Read more Immutably borrows from an owned value.
Read more Mutably borrows from an owned value.
Read more 🔬 This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from
self to
dest.
Read more Returns the argument unchanged.
Calls U::from(self).
That is, this conversion is whatever the implementation of
From <T> for U chooses to do.
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning.
Read more Uses borrowed data to replace owned data, usually by cloning.
Read more 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.