pub struct PeplError {
pub file: String,
pub code: ErrorCode,
pub severity: Severity,
pub category: ErrorCategory,
pub message: String,
pub span: Span,
pub source_line: String,
pub suggestion: Option<String>,
}Expand description
A structured PEPL compiler error.
Matches the error message format defined in the spec (compiler.md). The View Layer renders these — it must not parse free-form strings.
Fields§
§file: StringSource file name.
code: ErrorCodeError code (e.g., E201).
severity: SeverityError severity.
category: ErrorCategoryError category (derived from code).
message: StringHuman-readable error message.
span: SpanSource location.
source_line: StringThe exact source line for context.
suggestion: Option<String>Optional fix suggestion (for LLM re-prompting).
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for PeplError
impl<'de> Deserialize<'de> for PeplError
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Error for PeplError
impl Error for PeplError
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 Freeze for PeplError
impl RefUnwindSafe for PeplError
impl Send for PeplError
impl Sync for PeplError
impl Unpin for PeplError
impl UnwindSafe for PeplError
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