pub struct PreCommitRet<'c, H> { /* private fields */ }Expand description
Return type for CommitHook::pre_commit().
Use PreCommitRet::ok() to construct: PreCommitRet::ok(self, op).
Implementations§
Source§impl<'c, H> PreCommitRet<'c, H>
impl<'c, H> PreCommitRet<'c, H>
Sourcepub fn ok(hook: H, op: HookOperation<'c>) -> Result<Self, Error>
pub fn ok(hook: H, op: HookOperation<'c>) -> Result<Self, Error>
Creates a successful pre-commit result.
Auto Trait Implementations§
impl<'c, H> Freeze for PreCommitRet<'c, H>where
H: Freeze,
impl<'c, H> !RefUnwindSafe for PreCommitRet<'c, H>
impl<'c, H> Send for PreCommitRet<'c, H>where
H: Send,
impl<'c, H> Sync for PreCommitRet<'c, H>where
H: Sync,
impl<'c, H> Unpin for PreCommitRet<'c, H>where
H: Unpin,
impl<'c, H> !UnwindSafe for PreCommitRet<'c, H>
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§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