Struct git_checks_core::impl_prelude::SubmoduleContext
source · [−]pub struct SubmoduleContext<'a> {
pub name: Cow<'a, str>,
pub path: Cow<'a, str>,
pub url: Cow<'a, str>,
pub branch: Cow<'a, str>,
pub context: GitContext,
}
Expand description
A git context for a submodule for use within checks.
Checks which need to inspect submodules should use this to obtain a GitContext
for the
submodule.
Fields
name: Cow<'a, str>
The name of the submodule (usually the same as path
).
path: Cow<'a, str>
The path of the submodule within the repository.
url: Cow<'a, str>
The clone URL for the submodule.
branch: Cow<'a, str>
The branch the submodule tracks.
context: GitContext
The context to use to query the submodule.
Implementations
sourceimpl<'a> SubmoduleContext<'a>
impl<'a> SubmoduleContext<'a>
sourcepub fn new(ctx: &'a CheckGitContext, diff_path: &str) -> Option<Self>
pub fn new(ctx: &'a CheckGitContext, diff_path: &str) -> Option<Self>
Create submodule context for the given path.
Returns None
if the requisite information is not available within the context being used.
Trait Implementations
Auto Trait Implementations
impl<'a> RefUnwindSafe for SubmoduleContext<'a>
impl<'a> Send for SubmoduleContext<'a>
impl<'a> Sync for SubmoduleContext<'a>
impl<'a> Unpin for SubmoduleContext<'a>
impl<'a> UnwindSafe for SubmoduleContext<'a>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more