pub struct IgnorePolicy { /* private fields */ }Expand description
Effective exclusion policy for one registered repository.
Implementations§
Source§impl IgnorePolicy
impl IgnorePolicy
Sourcepub fn new(
configured_excludes: Vec<String>,
configured_excludes_source: ConfigSource,
include_defaults: Vec<String>,
include_defaults_source: ConfigSource,
) -> Result<Self, IgnorePatternError>
pub fn new( configured_excludes: Vec<String>, configured_excludes_source: ConfigSource, include_defaults: Vec<String>, include_defaults_source: ConfigSource, ) -> Result<Self, IgnorePatternError>
Builds one validated, compiled repository exclusion policy.
§Errors
Returns IgnorePatternError when a pattern is unsafe, malformed, or attempts to include
protected generated state.
Sourcepub fn configured_excludes(&self) -> &[String]
pub fn configured_excludes(&self) -> &[String]
User-supplied exclusions selected by repository configuration precedence.
Sourcepub const fn configured_excludes_source(&self) -> ConfigSource
pub const fn configured_excludes_source(&self) -> ConfigSource
Configuration layer that supplied Self::configured_excludes.
Sourcepub fn include_defaults(&self) -> &[String]
pub fn include_defaults(&self) -> &[String]
User-supplied exceptions to built-in default exclusions.
Sourcepub const fn include_defaults_source(&self) -> ConfigSource
pub const fn include_defaults_source(&self) -> ConfigSource
Configuration layer that supplied Self::include_defaults.
Sourcepub fn excludes(&self, relative: &Path, directory: bool) -> bool
pub fn excludes(&self, relative: &Path, directory: bool) -> bool
Whether one repository-relative path must be omitted from automatic discovery.
Sourcepub fn fingerprint_material(&self) -> String
pub fn fingerprint_material(&self) -> String
Stable material included in incremental repository fingerprints.
Trait Implementations§
Source§impl Clone for IgnorePolicy
impl Clone for IgnorePolicy
Source§fn clone(&self) -> IgnorePolicy
fn clone(&self) -> IgnorePolicy
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for IgnorePolicy
impl Debug for IgnorePolicy
impl Eq for IgnorePolicy
Source§impl PartialEq for IgnorePolicy
impl PartialEq for IgnorePolicy
Auto Trait Implementations§
impl Freeze for IgnorePolicy
impl RefUnwindSafe for IgnorePolicy
impl Send for IgnorePolicy
impl Sync for IgnorePolicy
impl Unpin for IgnorePolicy
impl UnsafeUnpin for IgnorePolicy
impl UnwindSafe for IgnorePolicy
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
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.