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§
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
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".