1use const_serialize::SerializeConst;
2
3use crate::{AssetOptions, AssetOptionsBuilder};
4
5#[derive(
7 Debug,
8 Eq,
9 PartialEq,
10 PartialOrd,
11 Clone,
12 Copy,
13 Hash,
14 SerializeConst,
15 serde::Serialize,
16 serde::Deserialize,
17)]
18pub struct FolderAssetOptions {}
19
20impl Default for FolderAssetOptions {
21 fn default() -> Self {
22 Self::default()
23 }
24}
25
26impl FolderAssetOptions {
27 pub const fn new() -> AssetOptionsBuilder<FolderAssetOptions> {
29 AssetOptions::folder()
30 }
31
32 pub const fn default() -> Self {
34 Self {}
35 }
36}
37
38impl AssetOptions {
39 pub const fn folder() -> AssetOptionsBuilder<FolderAssetOptions> {
46 AssetOptionsBuilder::variant(FolderAssetOptions::default())
47 }
48}
49
50impl AssetOptionsBuilder<FolderAssetOptions> {
51 pub const fn into_asset_options(self) -> AssetOptions {
53 AssetOptions {
54 add_hash: false,
55 variant: crate::AssetVariant::Folder(self.variant),
56 }
57 }
58}