pub struct LoadReport {
pub errors: Vec<LoadError>,
pub stats_loaded: bool,
pub settings_loaded: bool,
pub sessions_scanned: usize,
pub sessions_failed: usize,
}Expand description
Report of errors encountered during data loading
Enables graceful degradation by tracking partial failures instead of failing completely on any error.
Fields§
§errors: Vec<LoadError>§stats_loaded: bool§settings_loaded: bool§sessions_scanned: usize§sessions_failed: usizeImplementations§
Source§impl LoadReport
impl LoadReport
pub fn new() -> Self
pub fn add_error(&mut self, error: LoadError)
pub fn add_warning( &mut self, source: impl Into<String>, message: impl Into<String>, )
pub fn add_fatal( &mut self, source: impl Into<String>, message: impl Into<String>, )
Sourcepub fn has_fatal_errors(&self) -> bool
pub fn has_fatal_errors(&self) -> bool
Returns true if there are any fatal errors
Sourcepub fn has_errors(&self) -> bool
pub fn has_errors(&self) -> bool
Returns true if there are any errors (including warnings)
Sourcepub fn error_count(&self) -> (usize, usize, usize)
pub fn error_count(&self) -> (usize, usize, usize)
Returns count by severity
Sourcepub fn merge(&mut self, other: LoadReport)
pub fn merge(&mut self, other: LoadReport)
Merge another report into this one
Trait Implementations§
Source§impl Debug for LoadReport
impl Debug for LoadReport
Source§impl Default for LoadReport
impl Default for LoadReport
Source§fn default() -> LoadReport
fn default() -> LoadReport
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for LoadReport
impl RefUnwindSafe for LoadReport
impl Send for LoadReport
impl Sync for LoadReport
impl Unpin for LoadReport
impl UnsafeUnpin for LoadReport
impl UnwindSafe for LoadReport
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