pub enum RepoctlError {
Diagnostic {
diagnostic: Box<Diagnostic>,
},
Diagnostics {
diagnostics: Vec<Diagnostic>,
},
Io {
path: Utf8PathBuf,
source: Error,
},
Environment(String),
Internal(String),
}Expand description
Error type used by repoctl facade and capability services.
Variants§
Diagnostic
A single controlled diagnostic.
Fields
§
diagnostic: Box<Diagnostic>Diagnostic payload.
Diagnostics
Multiple controlled diagnostics.
Fields
§
diagnostics: Vec<Diagnostic>Diagnostic payloads.
Io
Filesystem operation failed.
Environment(String)
External environment or toolchain is unavailable.
Internal(String)
Internal bug surfaced as a controlled error.
Implementations§
Source§impl RepoctlError
impl RepoctlError
Sourcepub fn diagnostic(diagnostic: Diagnostic) -> Self
pub fn diagnostic(diagnostic: Diagnostic) -> Self
Creates a diagnostic error.
Sourcepub fn io(path: impl Into<Utf8PathBuf>, source: Error) -> Self
pub fn io(path: impl Into<Utf8PathBuf>, source: Error) -> Self
Creates an I/O error with path context.
Sourcepub fn diagnostics(&self) -> Vec<Diagnostic>
pub fn diagnostics(&self) -> Vec<Diagnostic>
Returns diagnostics embedded in the error, if any.
Trait Implementations§
Source§impl Debug for RepoctlError
impl Debug for RepoctlError
Source§impl Display for RepoctlError
impl Display for RepoctlError
Source§impl Error for RepoctlError
impl Error for RepoctlError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Auto Trait Implementations§
impl !RefUnwindSafe for RepoctlError
impl !UnwindSafe for RepoctlError
impl Freeze for RepoctlError
impl Send for RepoctlError
impl Sync for RepoctlError
impl Unpin for RepoctlError
impl UnsafeUnpin for RepoctlError
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