Skip to main content

AssetIo

Trait AssetIo 

Source
pub trait AssetIo: Send + Sync {
    // Required method
    fn load_bytes(&mut self, source: &AssetSource) -> Result<Vec<u8>, Error>;
}
Expand description

Trait for asset I/O backends (file system or pack archive).

Implementations handle the low-level reading of raw bytes from storage. The AssetService dispatches to this trait based on the AssetSource variant.

Required Methods§

Source

fn load_bytes(&mut self, source: &AssetSource) -> Result<Vec<u8>, Error>

Loads raw bytes from the given asset source.

Implementors§