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 errors(&self) -> Vec<AssetErrorMeta>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A>where
A: Allocator,
pub fn errors(&self) -> Vec<AssetErrorMeta>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A>where
A: Allocator,
A: Allocator,
Removes all errors and returns them.
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<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
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 morefn 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).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.fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self
to the equivalent element of its superset.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.