pub trait ModelResource<Cx: ?Sized>: Send + Sync {
// Required methods
fn label(&self) -> &'static str;
fn release(&mut self, cx: &Cx) -> Result<()>;
}Expand description
2026-09-25: State that owns device memory and must be released in a defined order.
Cx is whatever releasing needs; for GPU state that is the backend
(dyn GpuBackend). Making it a type parameter keeps metrale-core free of
a dependency on the backend crate while still handing each resource the
thing that owns its memory.