Skip to main content

PathPolicy

Struct PathPolicy 

Source
pub(crate) struct PathPolicy<'a> {
    rules: &'a [PathRuleState],
}

Fields§

§rules: &'a [PathRuleState]

Implementations§

Source§

impl<'a> PathPolicy<'a>

Source

pub(crate) fn new(rules: &'a [PathRuleState]) -> Result<Self, FilesError>

Build a resolver over normalized path rules.

§Errors

Returns an error when a rule’s selector is invalid.

Source

pub(crate) fn managed(&self, path: &RepositoryPath) -> Result<bool, FilesError>

Whether tracked files at a repository-relative path must be generated or marked as generated.

A path no rule marks is not managed.

§Errors

Returns an error when two rules disagree on managed at the same priority.

Auto Trait Implementations§

§

impl<'a> Freeze for PathPolicy<'a>

§

impl<'a> RefUnwindSafe for PathPolicy<'a>

§

impl<'a> Send for PathPolicy<'a>

§

impl<'a> Sync for PathPolicy<'a>

§

impl<'a> Unpin for PathPolicy<'a>

§

impl<'a> UnsafeUnpin for PathPolicy<'a>

§

impl<'a> UnwindSafe for PathPolicy<'a>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.