#[non_exhaustive]pub enum SymbolError {
Parse {
reason: String,
},
Unresolvable {
path: String,
reason: String,
},
BadPath {
reason: String,
},
Grammar(String),
}Expand description
Everything that can go wrong resolving a symbol path.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Parse
The source does not parse cleanly (ERROR or MISSING nodes anywhere: docs repositories compile, so a hostile or broken source must not silently yield a wrong span).
Unresolvable
The symbol path could not be resolved against the AST.
Fields
BadPath
The symbol path is malformed (empty, or deeper than the resolver descends).
Grammar(String)
The grammar failed to load (a build/packaging fault, not input).
Trait Implementations§
Source§impl Debug for SymbolError
impl Debug for SymbolError
Source§impl Display for SymbolError
impl Display for SymbolError
Source§impl Error for SymbolError
impl Error for SymbolError
1.30.0 · 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 Forget for SymbolError
impl Freeze for SymbolError
impl Move for SymbolError
impl RefUnwindSafe for SymbolError
impl Send for SymbolError
impl Sync for SymbolError
impl Unpin for SymbolError
impl UnsafeUnpin for SymbolError
impl UnwindSafe for SymbolError
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