pub trait ResourceFilesCollection {
type Resource: ResourceFile;
// Required methods
fn get_resource(&self, path: &str) -> Option<&Self::Resource>;
fn contains_key(&self, path: &str) -> bool;
}
Expand description
Basic abstraction for a dictionary of resources.
Required Associated Types§
type Resource: ResourceFile
Required Methods§
Sourcefn get_resource(&self, path: &str) -> Option<&Self::Resource>
fn get_resource(&self, path: &str) -> Option<&Self::Resource>
Get a resource by path
Sourcefn contains_key(&self, path: &str) -> bool
fn contains_key(&self, path: &str) -> bool
Check if a resource exists by path