pub struct LoadError {
pub source: String,
pub message: String,
pub severity: ErrorSeverity,
pub suggestion: Option<String>,
}Expand description
Individual error entry in load report
Fields§
§source: String§message: String§severity: ErrorSeverity§suggestion: Option<String>Actionable suggestion for user (optional)
Implementations§
Source§impl LoadError
impl LoadError
pub fn warning(source: impl Into<String>, message: impl Into<String>) -> Self
pub fn error(source: impl Into<String>, message: impl Into<String>) -> Self
pub fn fatal(source: impl Into<String>, message: impl Into<String>) -> Self
Sourcepub fn with_suggestion(self, suggestion: impl Into<String>) -> Self
pub fn with_suggestion(self, suggestion: impl Into<String>) -> Self
Add an actionable suggestion to this error
Sourcepub fn from_core_error(source: impl Into<String>, error: &CoreError) -> Self
pub fn from_core_error(source: impl Into<String>, error: &CoreError) -> Self
Create user-friendly error from CoreError with context-aware suggestions
Trait Implementations§
Auto Trait Implementations§
impl Freeze for LoadError
impl RefUnwindSafe for LoadError
impl Send for LoadError
impl Sync for LoadError
impl Unpin for LoadError
impl UnsafeUnpin for LoadError
impl UnwindSafe for LoadError
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