Struct determinator::rules::DeterminatorRules[][src]

pub struct DeterminatorRules {
    pub path_rules: Vec<PathRule>,
    pub package_rules: Vec<PackageRule>,
    // some fields omitted
}

Rules for the target determinator.

This forms a configuration file format that can be read from a TOML file.

For more about determinator rules, see the module-level documentation.

Fields

path_rules: Vec<PathRule>

A list of rules that each changed file path is matched against.

package_rules: Vec<PackageRule>

A list of rules that each affected package is matched against.

Sometimes, dependencies between workspace packages aren’t expressed in Cargo.tomls. The packages here act as “virtual dependencies” for the determinator.

Implementations

impl DeterminatorRules[src]

pub fn parse(s: &str) -> Result<Self, Error>[src]

Deserializes determinator rules from the given TOML string.

pub const DEFAULT_RULES_TOML: &'static str[src]

Contains the default rules in a TOML file format.

The default rules included with this copy of the determinator are:

# These are the default rules shipped with this version of the determinator library. These rules are embedded into the
# determinator library through `include_str!`.
#
# These rules are applied *after* custom rules, so a custom rule that matches any of the same files will override
# them.

# Standard ignore and other metadata files.
[[path-rule]]
globs = ["**/.gitignore", "**/.gitattributes", ".dockerignore", ".hgignore", ".svnignore", "**/.ignore"]
mark-changed = []

# Files that can affect the global build. Cargo.toml may contain updates to build flags or profile overrides,
# so rebuild everything if it changes. (We could do a more sophisticated analysis in the future.)
[[path-rule]]
globs = ["rust-toolchain", "Cargo.toml", "**/.cargo/config", "**/.cargo/config.toml"]
mark-changed = "all"

# Tool files that don't influence builds or tests.
[[path-rule]]
globs = ["clippy.toml", "rustfmt.toml", ".lintrules/**/*"]
mark-changed = []

# Cargo.lock is ignored, since the determinator does a deeper analysis to figure out which packages changed.
[[path-rule]]
globs = ["Cargo.lock"]
mark-changed = []

# README, LICENSE and other metadata files are ignored throughout the codebase.
[[path-rule]]
globs = ["**/README*", "**/LICENSE*", "**/CONTRIBUTING*", "**/CODE_OF_CONDUCT*", "**/SECURITY*"]
mark-changed = []

The latest version of the default rules is available on GitHub.

pub fn default_rules() -> &'static DeterminatorRules[src]

Returns the default rules.

These rules are applied after any custom rules, so they can be overridden by custom rules.

Trait Implementations

impl Clone for DeterminatorRules[src]

impl Debug for DeterminatorRules[src]

impl Default for DeterminatorRules[src]

The Default impl is the set of custom rules used by the determinator if set_rules isn’t called. It is an empty set of determinator rules, with use_default_rules set to true. This means that if set_rules isn’t called, the only rules in effect are the default ones.

impl<'de> Deserialize<'de> for DeterminatorRules[src]

impl Eq for DeterminatorRules[src]

impl PartialEq<DeterminatorRules> for DeterminatorRules[src]

impl Serialize for DeterminatorRules[src]

impl StructuralEq for DeterminatorRules[src]

impl StructuralPartialEq for DeterminatorRules[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<'a, T> DefaultFeatures<'a> for T where
    T: 'a + Clone + Send + Sync

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<'a, T> NonSyncFeatures<'a> for T where
    T: 'a + Clone

impl<T> Pointable for T

type Init = T

The type for initializers.

impl<T> SafeBorrow<T> for T where
    T: ?Sized

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.