pub trait AdminRegistry {
// Required methods
fn add_resource(&mut self, resource: Resource);
fn add_permission(&mut self, permission: Permission);
fn add_settings(&mut self, item: SettingsItem);
fn add_picker_source(&mut self, source: PickerSourceReg);
fn add_persister(&mut self, persister: PersisterReg);
fn add_field_type(&mut self, field_type: FieldTypeReg);
fn add_screen(&mut self, screen: ScreenReg);
fn add_public_route(&mut self, route: PublicRouteReg);
fn add_nav(&mut self, item: NavItem);
fn add_resource_hook(&mut self, hook: ResourceHook);
}Expand description
Typed contribution channels for the framework’s admin surfaces, as an
extension trait over the generic laterite_core::Registry. A module
contributes its admin screens, permissions, and settings from its register;
a wrong-type contribution is a compile error, not one silently ignored. The
generic add/items underneath remains for open, plugin-defined points.
Required Methods§
Sourcefn add_resource(&mut self, resource: Resource)
fn add_resource(&mut self, resource: Resource)
Adds a list/form resource (an admin screen).
Sourcefn add_permission(&mut self, permission: Permission)
fn add_permission(&mut self, permission: Permission)
Adds a permission, offered in the role editor.
Sourcefn add_settings(&mut self, item: SettingsItem)
fn add_settings(&mut self, item: SettingsItem)
Adds a settings model.
Sourcefn add_picker_source(&mut self, source: PickerSourceReg)
fn add_picker_source(&mut self, source: PickerSourceReg)
Adds a reference-picker source, callable by a picker field’s endpoints.
Sourcefn add_persister(&mut self, persister: PersisterReg)
fn add_persister(&mut self, persister: PersisterReg)
Adds a form persister, selectable by a form descriptor’s persist key.
Sourcefn add_field_type(&mut self, field_type: FieldTypeReg)
fn add_field_type(&mut self, field_type: FieldTypeReg)
Adds a field type, nameable by any form or settings descriptor.
Sourcefn add_screen(&mut self, screen: ScreenReg)
fn add_screen(&mut self, screen: ScreenReg)
Mounts a screen of this module’s own: any routes descriptors cannot express, inside the admin with its session, permission and error handling.
Sourcefn add_public_route(&mut self, route: PublicRouteReg)
fn add_public_route(&mut self, route: PublicRouteReg)
Mounts a route outside the admin, at a literal path: robots.txt, a sitemap, a feed, a webhook receiver.
Adds a menu entry or section. See nav::NavItem.
Sourcefn add_resource_hook(&mut self, hook: ResourceHook)
fn add_resource_hook(&mut self, hook: ResourceHook)
Changes another module’s resource before it mounts. See ResourceHook.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".