Skip to main content

AssetSource

Trait AssetSource 

Source
pub trait AssetSource: Send + Sync {
    // Required methods
    fn resolve_resource_path(&self, file_name: &str) -> Result<PathBuf>;
    fn load_string(
        &self,
        file_name: &str,
    ) -> impl Future<Output = Result<String>> + Send;
    fn load_binary(
        &self,
        file_name: &str,
    ) -> impl Future<Output = Result<Vec<u8>>> + Send;
}

Required Methods§

Source

fn resolve_resource_path(&self, file_name: &str) -> Result<PathBuf>

Source

fn load_string( &self, file_name: &str, ) -> impl Future<Output = Result<String>> + Send

Source

fn load_binary( &self, file_name: &str, ) -> impl Future<Output = Result<Vec<u8>>> + Send

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§