Skip to main content

mirage_engine/
catalog.rs

1//! The values startup proves before the first frame.
2
3/// Every value the engine proves it can build before the first frame.
4///
5/// [`derive(Catalog)`](macro@crate::Catalog) writes this for a mesh type
6/// or a sound vocabulary. One that a game writes itself must return every
7/// value that reads from [`Assets`](crate::Assets).
8pub trait Catalog: Sized {
9    /// Every value to build. A type with fields returns the values its
10    /// `#[catalog(...)]` names, each written as a value of the type; one that
11    /// writes this itself states them.
12    fn catalog() -> Vec<Self>;
13}