pub trait AssetSize {
// Required method
fn bytes(&self) -> usize;
}Expand description
Implemented by asset payload types so the cache can budget memory.
Required Methods§
Sourcefn bytes(&self) -> usize
fn bytes(&self) -> usize
Returns the approximate CPU-side byte cost of this asset, consulted by AssetServer::bytes_used and the LRU eviction sweep.