Skip to main content

trait.Assets

pub trait Assets: 'static + Send + Sync {
    pub fn get<Key>(&self, key: Key) -> Option<Cow<'_, [u8]>>
    where
        Key: Into<AssetKey>;
}

Represents a container of file assets that are retrievable during runtime.

Required methods#

pub fn get<Key>(&self, key: Key) -> Option<Cow<'_, [u8]>> where Key: Into<AssetKey>,#

Get the content of the passed AssetKey.

Loading content...

Implementors#

impl Assets for EmbeddedAssets#

pub fn get<Key>(&self, key: Key) -> Option<Cow<'_, [u8]>> where Key: Into<AssetKey>,#

Loading content...