pub struct PostCommitRequest<'request> {
pub real_git: &'request Path,
pub landed_oid: &'request str,
pub arguments: &'request [OsString],
pub global_prefix: &'request [OsString],
pub overlay: &'request [(OsString, OsString)],
pub config: PolicyConfig,
pub controls: Controls,
}Expand description
What: The inputs of one post-commit gate. Why: The landed commit names the delta; the global prefix and the environment make every query read the repository the commit landed in.
In TS you’d write (pseudocode):
type PostCommitInput = { gitPath; cwd; landedOid; arguments; policySeverities; policyOptions };Fields§
§real_git: &'request PathAbsolute real Git executable.
landed_oid: &'request strThe landed commit object name, as Git printed it.
arguments: &'request [OsString]The arguments the command forwarded to Git.
global_prefix: &'request [OsString]The global options of the invocation, kept before every query (-C, --git-dir, -c).
overlay: &'request [(OsString, OsString)]Variables added to every query.
config: PolicyConfigThe policy severities and options the gate runs with.
controls: ControlsEscapes and flags the invocation carries.
Trait Implementations§
Source§impl<'request> Clone for PostCommitRequest<'request>
impl<'request> Clone for PostCommitRequest<'request>
Auto Trait Implementations§
impl<'request> Freeze for PostCommitRequest<'request>
impl<'request> RefUnwindSafe for PostCommitRequest<'request>
impl<'request> Send for PostCommitRequest<'request>
impl<'request> Sync for PostCommitRequest<'request>
impl<'request> Unpin for PostCommitRequest<'request>
impl<'request> UnsafeUnpin for PostCommitRequest<'request>
impl<'request> UnwindSafe for PostCommitRequest<'request>
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
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