pub enum SurgeonError {
SymbolNotFound {
path: String,
did_you_mean: Vec<String>,
},
FileNotFound(PathBuf),
UnsupportedLanguage(PathBuf),
ParseError {
path: PathBuf,
reason: String,
},
Io(Error),
}Expand description
Errors that the surgeon engine can produce.
Variants§
SymbolNotFound
The requested symbol could not be found via the semantic path.
Fields
FileNotFound(PathBuf)
The requested file does not exist on disk.
Distinct from a generic I/O error so the MCP layer can surface this as a
client error (INVALID_PARAMS / FILE_NOT_FOUND) rather than an internal
server error (INTERNAL_ERROR).
UnsupportedLanguage(PathBuf)
The requested file’s language is not supported.
ParseError
A parsing error occurred.
Io(Error)
A file-system error occurred when attempting to read source files.
Trait Implementations§
Source§impl Debug for SurgeonError
impl Debug for SurgeonError
Source§impl Display for SurgeonError
impl Display for SurgeonError
Source§impl Error for SurgeonError
impl Error for SurgeonError
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()
Source§impl From<Error> for SurgeonError
impl From<Error> for SurgeonError
Source§impl From<SurgeonError> for PathfinderError
impl From<SurgeonError> for PathfinderError
Source§fn from(error: SurgeonError) -> Self
fn from(error: SurgeonError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for SurgeonError
impl !RefUnwindSafe for SurgeonError
impl Send for SurgeonError
impl Sync for SurgeonError
impl Unpin for SurgeonError
impl UnsafeUnpin for SurgeonError
impl !UnwindSafe for SurgeonError
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