Struct amethyst_assets::ProgressCounter
source · 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
sourceimpl 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 this struct is tracking.
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
sourceimpl Default for ProgressCounter
impl Default for ProgressCounter
sourcefn default() -> ProgressCounter
fn default() -> ProgressCounter
Returns the “default value” for a type. Read more
sourceimpl<'a> Progress for &'a mut ProgressCounter
impl<'a> Progress for &'a mut ProgressCounter
type Tracker = ProgressCounterTracker
type Tracker = ProgressCounterTracker
The tracker this progress can create.
sourcefn add_assets(&mut self, num: usize)
fn add_assets(&mut self, num: usize)
Add
num
assets to the progress.
This should be done whenever a new asset is
put in the queue. Read moresourcefn create_tracker(self) -> Self::Tracker
fn create_tracker(self) -> Self::Tracker
Creates a
Tracker
.Auto Trait Implementations
impl !RefUnwindSafe for ProgressCounter
impl Send for ProgressCounter
impl Sync for ProgressCounter
impl Unpin for ProgressCounter
impl !UnwindSafe for ProgressCounter
Blanket Implementations
impl<T> Any for Twhere
T: Any,
impl<T> Any for Twhere
T: Any,
fn get_type_id(&self) -> TypeId
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T> Pointable for T
impl<T> Pointable for T
impl<T> TryDefault for Twhere
T: Default,
impl<T> TryDefault for Twhere
T: Default,
fn try_default() -> Result<T, String>
fn try_default() -> Result<T, String>
Tries to create the default.
fn unwrap_default() -> Self
fn unwrap_default() -> Self
Calls
try_default
and panics on an error case.