pub trait RichError: std::error::Error + std::fmt::Debug + std::fmt::Display {
fn code(&self) -> &str;
fn message(&self) -> &str;
fn next_steps(&self) -> &[String];
fn suggestions(&self) -> &[String];
fn location(&self) -> Option<&crate::error::source_location::SourceLocation>;
fn more_info_url(&self) -> Option<&str>;
fn with_next_step(self, step: impl Into<String>) -> Self
where
Self: Sized;
fn with_next_steps(self, steps: &[&str]) -> Self
where
Self: Sized;
fn with_suggestion(self, suggestion: impl Into<String>) -> Self
where
Self: Sized;
fn with_suggestions(self, suggestions: &[&str]) -> Self
where
Self: Sized;
fn with_location(self, location: crate::error::source_location::SourceLocation) -> Self
where
Self: Sized;
fn with_more_info(self, url: impl Into<String>) -> Self
where
Self: Sized;
fn with_source(self, source: impl std::error::Error + Send + Sync + 'static) -> Self
where
Self: Sized;
}