Skip to main content

mln_engine/storage/
resource_options.rs

1/// Where a [`Loader`](crate::storage::Loader) keeps its cache and finds its assets.
2#[derive(Clone, Debug, PartialEq, Eq)]
3pub struct ResourceOptions {
4    /// The path of the database that caches resources. The default,
5    /// `":memory:"`, keeps the cache in memory.
6    pub cache_path: String,
7    /// The directory that `asset://` URLs load from.
8    pub asset_path: String,
9}
10
11impl Default for ResourceOptions {
12    fn default() -> Self {
13        ResourceOptions { cache_path: ":memory:".to_owned(), asset_path: ".".to_owned() }
14    }
15}