Struct determinator::rules::DeterminatorRules [−][src]
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]
fn clone(&self) -> DeterminatorRules
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[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]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl Eq for DeterminatorRules
[src]
impl PartialEq<DeterminatorRules> for DeterminatorRules
[src]
fn eq(&self, other: &DeterminatorRules) -> bool
[src]
fn ne(&self, other: &DeterminatorRules) -> bool
[src]
impl Serialize for DeterminatorRules
[src]
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer,
[src]
__S: Serializer,
impl StructuralEq for DeterminatorRules
[src]
impl StructuralPartialEq for DeterminatorRules
[src]
Auto Trait Implementations
impl RefUnwindSafe for DeterminatorRules
[src]
impl Send for DeterminatorRules
[src]
impl Sync for DeterminatorRules
[src]
impl Unpin for DeterminatorRules
[src]
impl UnwindSafe for DeterminatorRules
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<'a, T> DefaultFeatures<'a> for T where
T: 'a + Clone + Send + Sync,
T: 'a + Clone + Send + Sync,
pub fn clone_boxed(&self) -> Box<dyn DefaultFeatures<'a> + 'a, Global>
pub fn self_address_mut(&mut self) -> *mut ()
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<Q, K> Equivalent<K> for Q where
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
[src]
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
pub fn equivalent(&self, key: &K) -> bool
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<'a, T> NonSyncFeatures<'a> for T where
T: 'a + Clone,
T: 'a + Clone,
pub fn clone_boxed(&self) -> Box<dyn NonSyncFeatures<'a> + 'a, Global>
pub fn self_address_mut(&mut self) -> *mut ()
impl<T> Pointable for T
pub const ALIGN: usize
type Init = T
The type for initializers.
pub unsafe fn init(init: <T as Pointable>::Init) -> usize
pub unsafe fn deref<'a>(ptr: usize) -> &'a T
pub unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T
pub unsafe fn drop(ptr: usize)
impl<T> SafeBorrow<T> for T where
T: ?Sized,
T: ?Sized,
pub fn borrow_replacement(ptr: &T) -> &T
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,