pub struct ProgressCounter { /* private fields */ }
Expand description
A progress tracker which is passed to the Loader
in order to check how many assets are loaded.
Implementations§
Source§impl ProgressCounter
impl ProgressCounter
Sourcepub fn num_assets(&self) -> usize
pub fn num_assets(&self) -> usize
Returns the number of assets this struct is tracking.
Sourcepub fn num_failed(&self) -> usize
pub fn num_failed(&self) -> usize
Returns the number of assets that have failed.
Sourcepub fn num_loading(&self) -> usize
pub fn num_loading(&self) -> usize
Returns the number of assets that are still loading.
Sourcepub fn num_finished(&self) -> usize
pub fn num_finished(&self) -> usize
Returns the number of assets that have successfully loaded.
Sourcepub fn complete(&self) -> Completion
pub fn complete(&self) -> Completion
Returns Completion::Complete
if all tracked assets are finished.
Sourcepub fn is_complete(&self) -> bool
pub fn is_complete(&self) -> bool
Returns true
if all assets have been imported without error.
Trait Implementations§
Source§impl Debug for ProgressCounter
impl Debug for ProgressCounter
Source§impl Default for ProgressCounter
impl Default for ProgressCounter
Source§fn default() -> ProgressCounter
fn default() -> ProgressCounter
Returns the “default value” for a type. Read more
Source§impl<'a> Progress for &'a mut ProgressCounter
impl<'a> Progress for &'a mut ProgressCounter
Auto Trait Implementations§
impl Freeze for ProgressCounter
impl !RefUnwindSafe for ProgressCounter
impl Send for ProgressCounter
impl Sync for ProgressCounter
impl Unpin for ProgressCounter
impl !UnwindSafe for ProgressCounter
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<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self
from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self
is actually part of its subset T
(and can be converted to it).Source§unsafe fn to_subset_unchecked(&self) -> SS
unsafe fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset
but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self
to the equivalent element of its superset.Source§impl<T> TryDefault for Twhere
T: Default,
impl<T> TryDefault for Twhere
T: Default,
Source§fn try_default() -> Result<T, String>
fn try_default() -> Result<T, String>
Tries to create the default.
Source§fn unwrap_default() -> Self
fn unwrap_default() -> Self
Calls
try_default
and panics on an error case.