pub struct ErrorDetail {
pub operation: String,
pub command: Option<String>,
pub exit_code: Option<i32>,
pub stderr: String,
pub git2: Option<Git2Detail>,
}Expand description
The facts of one failed backend operation.
Fields§
§operation: StringWhat the user asked for (Push, Pull, …), or git’s subcommand
until the daemon names the operation.
command: Option<String>The git command line that ran, redacted. GitPoulpi’s pinned -c
output-shape overrides are left out: they are on every command.
exit_code: Option<i32>§stderr: StringThe last STDERR_TAIL_LINES lines of stderr, redacted.
git2: Option<Git2Detail>Implementations§
Source§impl ErrorDetail
impl ErrorDetail
Sourcepub fn from_git(args: &[&str], exit_code: Option<i32>, stderr: &str) -> Self
pub fn from_git(args: &[&str], exit_code: Option<i32>, stderr: &str) -> Self
A failed git <args>: args are the command’s own arguments.
Sourcepub fn from_git2(
operation: &str,
class: impl Into<String>,
code: impl Into<String>,
message: &str,
) -> Self
pub fn from_git2( operation: &str, class: impl Into<String>, code: impl Into<String>, message: &str, ) -> Self
A libgit2 failure.
Sourcepub fn with_operation(self, operation: impl Into<String>) -> Self
pub fn with_operation(self, operation: impl Into<String>) -> Self
The same detail under the user-level operation’s name.
Sourcepub fn kind(&self) -> FailureKind
pub fn kind(&self) -> FailureKind
The best-effort reading of what failed.
Trait Implementations§
Source§impl Clone for ErrorDetail
impl Clone for ErrorDetail
Source§impl Debug for ErrorDetail
impl Debug for ErrorDetail
Source§impl Default for ErrorDetail
impl Default for ErrorDetail
Source§impl<'de> Deserialize<'de> for ErrorDetail
impl<'de> Deserialize<'de> for ErrorDetail
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for ErrorDetail
Source§impl PartialEq for ErrorDetail
impl PartialEq for ErrorDetail
Source§impl Serialize for ErrorDetail
impl Serialize for ErrorDetail
impl StructuralPartialEq for ErrorDetail
Auto Trait Implementations§
impl Forget for ErrorDetail
impl Freeze for ErrorDetail
impl Move for ErrorDetail
impl RefUnwindSafe for ErrorDetail
impl Send for ErrorDetail
impl Sync for ErrorDetail
impl Unpin for ErrorDetail
impl UnsafeUnpin for ErrorDetail
impl UnwindSafe for ErrorDetail
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