pub struct LoadingProgress {
pub start_time: Instant,
pub modules: Vec<ModuleLoadStatus>,
pub completed_count: usize,
pub failed_count: usize,
pub current_loading: Option<String>,
}Expand description
Overall loading progress tracking
Fields§
§start_time: Instant§modules: Vec<ModuleLoadStatus>§completed_count: usize§failed_count: usize§current_loading: Option<String>Implementations§
Source§impl LoadingProgress
impl LoadingProgress
pub fn new() -> Self
pub fn add_module(&mut self, path: String)
pub fn start_module_loading(&mut self, path: &str)
pub fn complete_module(&mut self, path: &str, stats: ModuleStats)
pub fn fail_module(&mut self, path: &str, error: String)
pub fn total_modules(&self) -> usize
pub fn progress_ratio(&self) -> f64
pub fn elapsed_time(&self) -> f64
pub fn recently_completed(&self, limit: usize) -> Vec<&ModuleLoadStatus>
pub fn recently_failed(&self, limit: usize) -> Vec<&ModuleLoadStatus>
pub fn recently_finished(&self, limit: usize) -> Vec<&ModuleLoadStatus>
pub fn total_stats(&self) -> ModuleStats
pub fn is_complete(&self) -> bool
Trait Implementations§
Source§impl Clone for LoadingProgress
impl Clone for LoadingProgress
Source§fn clone(&self) -> LoadingProgress
fn clone(&self) -> LoadingProgress
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for LoadingProgress
impl Debug for LoadingProgress
Auto Trait Implementations§
impl Freeze for LoadingProgress
impl RefUnwindSafe for LoadingProgress
impl Send for LoadingProgress
impl Sync for LoadingProgress
impl Unpin for LoadingProgress
impl UnwindSafe for LoadingProgress
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more