pub enum DiscoverError {
Io(Error),
CircularInclude(String),
InvalidKey(String),
NonNativeKey(String),
}Expand description
Errors from file discovery.
Variants§
Io(Error)
File I/O error during discovery.
CircularInclude(String)
Circular INCLUDE dependency detected.
InvalidKey(String)
A native discovery key is not root-relative (contains a ..
segment). native_module_path treats .. literally, so letting one
through would mint a bogus module (../x.brink → story::..::x) —
save-key-identity-critical (issue #1288 review note (a)). Every
current SourceTree (RealFs, GitRev, InMemory) already
produces root-relative, ..-free keys; this guards against a future
implementation that doesn’t.
NonNativeKey(String)
A key discover_native was handed does not have the .brink
extension. discover_native must only ever see native source (issue
#1371): tree is a &dyn SourceTree, and nothing at the type level
stops a caller from handing it an implementation scoped wider than
.brink alone — e.g. brink_source_tree::InMemory, the tree
brink-web’s compile() builds (.ink-keyed) and hands to
brink_environment::Project::load, not to native discovery — which
would let .ink text be parsed as brink source. Checked (like
InvalidKey) before
any file is loaded, so a violation rejects the whole discovery, not
just the offending key.
Trait Implementations§
Source§impl Debug for DiscoverError
impl Debug for DiscoverError
Source§impl Display for DiscoverError
impl Display for DiscoverError
Source§impl Error for DiscoverError
impl Error for DiscoverError
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()