Enum CodeLoreError
pub enum CodeLoreError {
Repo(String),
Analysis(String),
Output(String),
Io(Error),
RepoIo(Error),
MalformedTeamMap {
path: PathBuf,
line: usize,
reason: String,
},
UnknownAnalysisName {
name: String,
supported: Vec<&'static str>,
},
BlobNotFound {
oid: String,
},
InvalidOptions(String),
}Variants§
Repo(String)
Analysis(String)
Output(String)
Io(Error)
RepoIo(Error)
std::io::Error from a read-side input path — loading a
user-supplied config file (--team-map, --arch-rules-file),
probing a repo path, reading a .gitignore chain. Distinct
from Io (which covers write-side output emitter failures and
auto-derives via #[from]) because the exit-code mapping
differs: read-side input failures map to spec §6.6 exit 3
(repo/input error) so CI orchestrators can distinguish “the
user pointed me at unreadable input” from “the output pipe
broke mid-write”. Constructed explicitly at the small set of
read-side call sites; never participates in From so generic
? propagation defaults to the write-side Io variant.
MalformedTeamMap
User-supplied team-map CSV is malformed. line is 1-indexed and
0 means a structural problem before any data row (e.g. missing
header). CLI uses this to print a “fix <path> line N” hint.
UnknownAnalysisName
--analysis foo was passed but foo isn’t an analysis name we
know. supported lists what we DO accept so the CLI can echo it.
BlobNotFound
A blob OID resolved from a tree-walk wasn’t found in the object database. Almost always means the repo is shallow-cloned (parent ancestry truncated) or corrupted; distinct from generic repo errors so consumers can refuse to retry on bad data.
InvalidOptions(String)
Cross-field validation of CLI options failed (e.g. --min-coupling
exceeds --max-coupling, an out-of-range clone-similarity floor, or
--after later than --before). A pure argument conflict, sharing
the exit-2 configuration-error bucket with MalformedTeamMap.
Implementations§
§impl CodeLoreError
impl CodeLoreError
Trait Implementations§
§impl Debug for CodeLoreError
impl Debug for CodeLoreError
§impl Display for CodeLoreError
impl Display for CodeLoreError
§impl Error for CodeLoreError
impl Error for CodeLoreError
§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
§impl From<Error> for CodeLoreError
impl From<Error> for CodeLoreError
§impl From<UnknownAnalysisError> for CodeLoreError
impl From<UnknownAnalysisError> for CodeLoreError
§fn from(e: UnknownAnalysisError) -> Self
fn from(e: UnknownAnalysisError) -> Self
Auto Trait Implementations§
impl !RefUnwindSafe for CodeLoreError
impl !UnwindSafe for CodeLoreError
impl Freeze for CodeLoreError
impl Send for CodeLoreError
impl Sync for CodeLoreError
impl Unpin for CodeLoreError
impl UnsafeUnpin for CodeLoreError
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> ErrorExt for T
impl<T> ErrorExt for T
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> ⓘ
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> ⓘ
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