Struct gix_submodule::IsActivePlatform
source · 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>.activeis set inconfig - it matches a
submodule.activepathspec either positively or negatively via:!<spec> - it’s active if it has any
urlset inconfig
Auto Trait Implementations§
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