pub trait ErrorContextExt<T> {
// Required methods
fn file_context(self, operation: &str, path: &Path) -> Result<T>;
fn git_context(self, command: &str, repo: Option<&str>) -> Result<T>;
fn manifest_context(
self,
operation: &str,
details: Option<&str>,
) -> Result<T>;
fn dependency_context(self, dependency: &str, reason: &str) -> Result<T>;
fn network_context(self, operation: &str, url: Option<&str>) -> Result<T>;
}Expand description
Helper trait to easily attach error contexts
Required Methods§
Sourcefn file_context(self, operation: &str, path: &Path) -> Result<T>
fn file_context(self, operation: &str, path: &Path) -> Result<T>
Attach a file error context
Sourcefn git_context(self, command: &str, repo: Option<&str>) -> Result<T>
fn git_context(self, command: &str, repo: Option<&str>) -> Result<T>
Attach a git error context
Sourcefn manifest_context(self, operation: &str, details: Option<&str>) -> Result<T>
fn manifest_context(self, operation: &str, details: Option<&str>) -> Result<T>
Attach a manifest error context
Sourcefn dependency_context(self, dependency: &str, reason: &str) -> Result<T>
fn dependency_context(self, dependency: &str, reason: &str) -> Result<T>
Attach a dependency error context