pub struct Catalog { /* private fields */ }Expand description
The presentation catalog served at GET /catalog.
Build one from the profiles a deployment runs with from_profiles,
or from presentations directly with from_presentations.
The page fetches it on boot, appends its custom presets to the built-in ones, applies
the theme, and places groups on its network map where
with_site_position says. A gateway with no custom
elements need not serve a catalog at all; the page then keeps its defaults.
Implementations§
Source§impl Catalog
impl Catalog
Sourcepub fn from_profiles(profiles: &[&Profile]) -> Self
pub fn from_profiles(profiles: &[&Profile]) -> Self
Builds a catalog from the presentation of each profile a deployment runs.
Every ElementSpec across the profiles becomes one
preset, keyed and de-duplicated by its element key (the first wins). The theme is
the first one a profile declares.
§Arguments
profiles- the profiles whose presentation to gather.
§Returns
A catalog carrying the custom presets and theme.
Sourcepub fn from_presentations(presentations: &[&Presentation]) -> Self
pub fn from_presentations(presentations: &[&Presentation]) -> Self
Builds a catalog from presentations, for a deployment that declares its elements without a profile.
The de-duplication and theme rules are those of
from_profiles.
§Arguments
presentations- the presentations whose elements to gather.
§Returns
A catalog carrying the custom presets and theme.