pub struct CheckGitContext { /* private fields */ }Expand description
Git context for use in checks.
Implementations§
Source§impl CheckGitContext
impl CheckGitContext
Sourcepub fn new(workarea: GitWorkArea, topic_owner: Identity) -> Self
pub fn new(workarea: GitWorkArea, topic_owner: Identity) -> Self
Create a new git context for checking a commit.
Sourcepub fn add_configuration<K, V>(&mut self, key: K, value: V) -> &mut Self
pub fn add_configuration<K, V>(&mut self, key: K, value: V) -> &mut Self
Add a configuration value for use by checks.
Any existing configuration value is overwritten.
Sourcepub fn add_configurations<I, K, V>(&mut self, iter: I) -> &mut Self
pub fn add_configurations<I, K, V>(&mut self, iter: I) -> &mut Self
Add a sequence of configuration values for use by checks.
Any existing configuration values are overwritten.
Sourcepub fn topic_owner(&self) -> &Identity
pub fn topic_owner(&self) -> &Identity
The publisher of the branch.
Sourcepub fn configuration(&self, key: &str) -> Option<&str>
pub fn configuration(&self, key: &str) -> Option<&str>
Query for a configuration value.
Sourcepub fn check_attr<A, P>(
&self,
attr: A,
path: P,
) -> Result<AttributeState, AttributeError>
pub fn check_attr<A, P>( &self, attr: A, path: P, ) -> Result<AttributeState, AttributeError>
Check an attribute of the given path.
Sourcepub fn workarea(&self) -> &GitWorkArea
pub fn workarea(&self) -> &GitWorkArea
The workarea used for check operations.
Sourcepub fn workarea_mut(&mut self) -> &mut GitWorkArea
pub fn workarea_mut(&mut self) -> &mut GitWorkArea
The workarea used for check operations.
Sourcepub fn submodule_config(&self) -> &SubmoduleConfig
pub fn submodule_config(&self) -> &SubmoduleConfig
The submodule configuration for the repository.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for CheckGitContext
impl RefUnwindSafe for CheckGitContext
impl Send for CheckGitContext
impl Sync for CheckGitContext
impl Unpin for CheckGitContext
impl UnwindSafe for CheckGitContext
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more