ResourceFilesCollection

Trait ResourceFilesCollection 

Source
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§

Required Methods§

Source

fn get_resource(&self, path: &str) -> Option<&Self::Resource>

Get a resource by path

Source

fn contains_key(&self, path: &str) -> bool

Check if a resource exists by path

Implementations on Foreign Types§

Source§

impl ResourceFilesCollection for HashMap<&'static str, Resource>

Source§

type Resource = Resource

Source§

fn get_resource(&self, path: &str) -> Option<&Self::Resource>

Source§

fn contains_key(&self, path: &str) -> bool

Source§

impl<R> ResourceFilesCollection for Rc<R>

Source§

impl<R> ResourceFilesCollection for Arc<R>

Implementors§