pub enum HookPlanError {
ConfigRead(String),
NotUtf8(&'static str),
Random(String),
}Expand description
What: Why planning or encoding a plan failed. Why: The caller stops the commit with the message; a plan is never partially written.
In TS you’d write (pseudocode):
throw new TypeError(`git config --get ${key} failed: ${stderr.trim()}`);Variants§
ConfigRead(String)
A git config --get read failed with a code other than 1; holds Git’s stderr text.
NotUtf8(&'static str)
A value the plan records is not UTF-8, so it cannot be written as JSON text.
Random(String)
The random source for a preparation lease token failed.
Trait Implementations§
Source§impl Clone for HookPlanError
impl Clone for HookPlanError
Source§impl Debug for HookPlanError
impl Debug for HookPlanError
Source§impl Display for HookPlanError
What:
One line for each planning failure.
Why:
The caller prints it as the diagnostic.
impl Display for HookPlanError
What: One line for each planning failure. Why: The caller prints it as the diagnostic.
In TS you’d write (pseudocode):
error.messageimpl Eq for HookPlanError
Source§impl PartialEq for HookPlanError
impl PartialEq for HookPlanError
impl StructuralPartialEq for HookPlanError
Auto Trait Implementations§
impl Freeze for HookPlanError
impl RefUnwindSafe for HookPlanError
impl Send for HookPlanError
impl Sync for HookPlanError
impl Unpin for HookPlanError
impl UnsafeUnpin for HookPlanError
impl UnwindSafe for HookPlanError
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.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