euv_core/runtime/assets/enum.rs
1/// Memory residency domain occupied by a managed runtime asset.
2#[derive(Clone, Copy, Debug, Default, Eq, Hash, Ord, PartialEq, PartialOrd)]
3pub enum AssetStorageKind {
4 /// Asset resides solely in CPU RAM cache.
5 #[default]
6 Ram,
7 /// Asset resides solely in GPU VRAM (texture/buffer).
8 Vram,
9 /// Asset maintains both a CPU staging buffer and a GPU VRAM allocation.
10 Hybrid,
11}
12
13/// Lifecycle state of an entry tracked inside `AssetManager`.
14#[derive(Clone, Copy, Debug, Default, Eq, Hash, Ord, PartialEq, PartialOrd)]
15pub enum AssetLoadState {
16 /// Load request is in flight and cancelable before completion.
17 #[default]
18 Pending,
19 /// Asset payload is resident and ready for immediate lookup.
20 Ready,
21 /// Pending load request was canceled prior to completion.
22 Canceled,
23 /// Resident asset was evicted to enforce RAM or VRAM budgets.
24 Evicted,
25}
26
27/// Error returned by `AssetManager` budget, cancellation, or handle validation checks.
28#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
29pub enum AssetError {
30 /// Asset footprint exceeds available RAM or VRAM budget after evicting all unpinned entries.
31 ExceedsBudget,
32 /// Pending load handle was canceled before completion.
33 Canceled,
34 /// Handle slot or generation does not match a live entry.
35 InvalidHandle,
36}