Struct AssetsDatabase

Source
pub struct AssetsDatabase {
    pub max_bytes_per_frame: Option<usize>,
    /* private fields */
}

Fields§

§max_bytes_per_frame: Option<usize>

Implementations§

Source§

impl AssetsDatabase

Source

pub fn new<FE>(fetch_engine: FE) -> AssetsDatabase
where FE: FetchEngine + 'static,

Source

pub fn register_error_reporter<T>(&mut self, reporter: T)
where T: AssetsDatabaseErrorReporter + 'static,

Source

pub fn unregister_error_reporter<T>(&mut self)
where T: AssetsDatabaseErrorReporter + 'static,

Source

pub fn loaded_count(&self) -> usize

Source

pub fn loaded_paths(&self) -> Vec<String>

Source

pub fn loaded_ids(&self) -> Vec<ID<Asset>>

Source

pub fn loading_count(&self) -> usize

Source

pub fn loading_paths(&self) -> Vec<String>

Source

pub fn yielded_count(&self) -> usize

Source

pub fn yielded_paths(&self) -> Vec<String>

Source

pub fn yielded_deps_count(&self) -> usize

Source

pub fn yielded_deps_paths(&self) -> Vec<String>

Source

pub fn lately_loaded(&self) -> impl Iterator<Item = &ID<Asset>>

Source

pub fn lately_loaded_paths(&self) -> impl Iterator<Item = &str>

Source

pub fn lately_loaded_protocol<'a>( &'a self, protocol: &'a str, ) -> impl Iterator<Item = &'a ID<Asset>>

Source

pub fn lately_unloaded(&self) -> impl Iterator<Item = &ID<Asset>>

Source

pub fn lately_unloaded_paths(&self) -> impl Iterator<Item = &str>

Source

pub fn lately_unloaded_protocol<'a>( &'a self, protocol: &'a str, ) -> impl Iterator<Item = &'a ID<Asset>>

Source

pub fn is_ready(&self) -> bool

Source

pub fn are_ready<I, S>(&self, iter: I) -> bool
where I: IntoIterator<Item = S>, S: AsRef<str>,

Source

pub fn has_fetch_engine(&self) -> bool

Source

pub fn fetch_engines_stack_size(&self) -> usize

Source

pub fn push_fetch_engine(&mut self, fetch_engine: Box<dyn FetchEngine>)

Source

pub fn pop_fetch_engine(&mut self) -> Option<Box<dyn FetchEngine>>

Source

pub fn fetch_engine(&self) -> Option<&dyn FetchEngine>

Source

pub fn fetch_engine_mut(&mut self) -> Option<&mut (dyn FetchEngine + 'static)>

Source

pub fn with_fetch_engine<F, R>(&mut self, action: F) -> Option<R>
where F: FnMut(&mut dyn FetchEngine) -> R,

Source

pub fn register<FE>(&mut self, protocol: FE)
where FE: AssetProtocol + 'static,

Source

pub fn unregister( &mut self, protocol_name: &str, ) -> Option<Box<dyn AssetProtocol>>

Source

pub fn load(&mut self, path: &str) -> Result<(), LoadStatus>

Source

pub fn insert(&mut self, asset: Asset) -> ID<Asset>

Source

pub fn remove_by_id(&mut self, id: ID<Asset>) -> Option<Asset>

Source

pub fn remove_by_path(&mut self, path: &str) -> Option<Asset>

Source

pub fn remove_by_variants(&mut self, variants: &[AssetVariant])

Source

pub fn id_by_path(&self, path: &str) -> Option<ID<Asset>>

Source

pub fn path_by_id(&self, id: ID<Asset>) -> Option<&str>

Source

pub fn asset_by_id(&self, id: ID<Asset>) -> Option<&Asset>

Source

pub fn asset_by_path(&self, path: &str) -> Option<&Asset>

Source

pub fn defer_lately_cleanup(&mut self)

Source

pub fn process(&mut self)

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> Finalize for T

Source§

unsafe fn finalize_raw(data: *mut ())

Safety Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> Component for T
where T: Send + Sync + 'static,