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.
The page fetches it on boot, appends its custom presets to the built-in ones, and
applies the theme. 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.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Catalog
impl RefUnwindSafe for Catalog
impl Send for Catalog
impl Sync for Catalog
impl Unpin for Catalog
impl UnsafeUnpin for Catalog
impl UnwindSafe for Catalog
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more