pub trait Assets<R: Runtime>:
Send
+ Sync
+ 'static {
// Required methods
fn get(&self, key: &AssetKey) -> Option<Cow<'_, [u8]>>;
fn iter(&self) -> Box<AssetsIter<'_>>;
fn csp_hashes(
&self,
html_path: &AssetKey,
) -> Box<dyn Iterator<Item = CspHash<'_>> + '_>;
// Provided method
fn setup(&self, app: &App<R>) { ... }
}
Expand description
Represents a container of file assets that are retrievable during runtime.
Required Methods§
Sourcefn iter(&self) -> Box<AssetsIter<'_>>
fn iter(&self) -> Box<AssetsIter<'_>>
Iterator for the assets.