Skip to main content

AssetSize

Trait AssetSize 

Source
pub trait AssetSize {
    // Required method
    fn bytes(&self) -> usize;
}
Expand description

Implemented by asset payload types so the cache can budget memory.

Required Methods§

Source

fn bytes(&self) -> usize

Returns the approximate CPU-side byte cost of this asset, consulted by AssetServer::bytes_used and the LRU eviction sweep.

Implementors§