#[non_exhaustive]pub enum GraphError {
UnresolvableModuleSource {
module_source: Arc<str>,
site: Box<Span>,
},
DepthExceeded {
limit: u32,
site: Box<Span>,
},
AddressCollision(Address),
PathSafety {
path: PathBuf,
reason: Arc<str>,
},
}Expand description
Errors the graph builder can surface.
Per 15-resource-graph.md § 7, UnresolvableModuleSource and
DepthExceeded are not fatal — the builder records them as
crate::Diagnostics and continues. Only GraphError::AddressCollision
is fatal: it indicates a bug in the expansion logic, not user input.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
UnresolvableModuleSource
A module call’s source could not be resolved to a known local module.
Treated as a diagnostic at the call site, never fatal.
Fields
DepthExceeded
Module recursion exceeded the configured depth cap. Records the path where the cap fired.
AddressCollision(Address)
Two flattened resources resolved to the same Address. Fatal: the
IR cannot represent two rows with the same address.
PathSafety
Path-safety check failed when resolving a local module source. Non-fatal in spec; the builder logs a diagnostic and skips the call.
Trait Implementations§
Source§impl Debug for GraphError
impl Debug for GraphError
Source§impl Display for GraphError
impl Display for GraphError
Source§impl Error for GraphError
impl Error for GraphError
1.30.0 · Source§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()