pub struct RevalidationContext<'a> {
pub invocation: &'a CommitInvocation<'a>,
pub capture: &'a InvocationCapture,
pub read_only_selection: bool,
pub global_args: &'a [String],
pub no_verify: bool,
}Expand description
What: What revalidation reads besides the policies. Why: The hook re-run needs the kept global options and the shim; the policies need the capture.
In TS you’d write (pseudocode):
type RevalidationContext = { gitPath; cwd; capture; workspace; args; policyOptions; readOnlySelection; repositoryRoot; globalArgs; noVerify };Fields§
§invocation: &'a CommitInvocation<'a>The invocation’s fixed facts.
capture: &'a InvocationCaptureThe invocation capture.
read_only_selection: boolWhether interactive or include selection forbids automatic patches.
global_args: &'a [String]The caller’s kept global options.
no_verify: boolWhether the invocation bypassed pre-commit with --no-verify.
Auto Trait Implementations§
impl<'a> Freeze for RevalidationContext<'a>
impl<'a> RefUnwindSafe for RevalidationContext<'a>
impl<'a> Send for RevalidationContext<'a>
impl<'a> Sync for RevalidationContext<'a>
impl<'a> Unpin for RevalidationContext<'a>
impl<'a> UnsafeUnpin for RevalidationContext<'a>
impl<'a> UnwindSafe for RevalidationContext<'a>
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> 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