pub struct IsActivePlatform { /* private fields */ }
Expand description
A platform to keep the state necessary to perform repeated active checks, created by File::is_active_platform().
Implementations§
Source§impl IsActivePlatform
impl IsActivePlatform
Sourcepub fn is_active(
&mut self,
config: &File<'static>,
name: &BStr,
attributes: &mut dyn FnMut(&BStr, Case, bool, &mut Outcome) -> bool,
) -> Result<bool, Error>
pub fn is_active( &mut self, config: &File<'static>, name: &BStr, attributes: &mut dyn FnMut(&BStr, Case, bool, &mut Outcome) -> bool, ) -> Result<bool, Error>
Returns true
if the submodule named name
is active or false
otherwise.
config
is the configuration that was passed to the originating modules file.
attributes(relative_path, case, is_dir, outcome)
provides a way to resolve the attributes mentioned
in submodule.active
pathspecs that are evaluated in the platforms git configuration.
A submodule’s active state is determined in the following order
- it’s
submodule.<name>.active
is set inconfig
- it matches a
submodule.active
pathspec either positively or negatively via:!<spec>
- it’s active if it has any
url
set inconfig
Auto Trait Implementations§
impl Freeze for IsActivePlatform
impl RefUnwindSafe for IsActivePlatform
impl Send for IsActivePlatform
impl Sync for IsActivePlatform
impl Unpin for IsActivePlatform
impl UnwindSafe for IsActivePlatform
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