pub struct AssetsDatabase {
pub max_bytes_per_frame: Option<usize>,
/* private fields */
}
Fields§
§max_bytes_per_frame: Option<usize>
Implementations§
Source§impl AssetsDatabase
impl AssetsDatabase
pub fn new<FE>(fetch_engine: FE) -> AssetsDatabasewhere
FE: FetchEngine + 'static,
pub fn register_error_reporter<T>(&mut self, reporter: T)where
T: AssetsDatabaseErrorReporter + 'static,
pub fn unregister_error_reporter<T>(&mut self)where
T: AssetsDatabaseErrorReporter + 'static,
pub fn loaded_count(&self) -> usize
pub fn loaded_paths(&self) -> Vec<String>
pub fn loaded_ids(&self) -> Vec<ID<Asset>>
pub fn loading_count(&self) -> usize
pub fn loading_paths(&self) -> Vec<String>
pub fn yielded_count(&self) -> usize
pub fn yielded_paths(&self) -> Vec<String>
pub fn yielded_deps_count(&self) -> usize
pub fn yielded_deps_paths(&self) -> Vec<String>
pub fn lately_loaded(&self) -> impl Iterator<Item = &ID<Asset>>
pub fn lately_loaded_paths(&self) -> impl Iterator<Item = &str>
pub fn lately_loaded_protocol<'a>( &'a self, protocol: &'a str, ) -> impl Iterator<Item = &'a ID<Asset>>
pub fn lately_unloaded(&self) -> impl Iterator<Item = &ID<Asset>>
pub fn lately_unloaded_paths(&self) -> impl Iterator<Item = &str>
pub fn lately_unloaded_protocol<'a>( &'a self, protocol: &'a str, ) -> impl Iterator<Item = &'a ID<Asset>>
pub fn is_ready(&self) -> bool
pub fn are_ready<I, S>(&self, iter: I) -> bool
pub fn has_fetch_engine(&self) -> bool
pub fn fetch_engines_stack_size(&self) -> usize
pub fn push_fetch_engine(&mut self, fetch_engine: Box<dyn FetchEngine>)
pub fn pop_fetch_engine(&mut self) -> Option<Box<dyn FetchEngine>>
pub fn fetch_engine(&self) -> Option<&dyn FetchEngine>
pub fn fetch_engine_mut(&mut self) -> Option<&mut (dyn FetchEngine + 'static)>
pub fn with_fetch_engine<F, R>(&mut self, action: F) -> Option<R>where
F: FnMut(&mut dyn FetchEngine) -> R,
pub fn register<FE>(&mut self, protocol: FE)where
FE: AssetProtocol + 'static,
pub fn unregister( &mut self, protocol_name: &str, ) -> Option<Box<dyn AssetProtocol>>
pub fn load(&mut self, path: &str) -> Result<(), LoadStatus>
pub fn insert(&mut self, asset: Asset) -> ID<Asset>
pub fn remove_by_id(&mut self, id: ID<Asset>) -> Option<Asset>
pub fn remove_by_path(&mut self, path: &str) -> Option<Asset>
pub fn remove_by_variants(&mut self, variants: &[AssetVariant])
pub fn id_by_path(&self, path: &str) -> Option<ID<Asset>>
pub fn path_by_id(&self, id: ID<Asset>) -> Option<&str>
pub fn asset_by_id(&self, id: ID<Asset>) -> Option<&Asset>
pub fn asset_by_path(&self, path: &str) -> Option<&Asset>
pub fn defer_lately_cleanup(&mut self)
pub fn process(&mut self)
Auto Trait Implementations§
impl Freeze for AssetsDatabase
impl !RefUnwindSafe for AssetsDatabase
impl Send for AssetsDatabase
impl Sync for AssetsDatabase
impl Unpin for AssetsDatabase
impl !UnwindSafe for AssetsDatabase
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