pub struct AreaGroup { /* private fields */ }Expand description
The entries of one group of an Area, in the order they are registered. Each resource and
page mounts at {prefix}/{area}/{slug}, its slug taken from the area’s own namespace, and
its def’s navigation_group gives way to the group.
Implementations§
Source§impl AreaGroup
impl AreaGroup
Sourcepub fn resource<R: Resource>(self) -> Self
pub fn resource<R: Resource>(self) -> Self
Registers the Resource R in the group, as Panel::resource
registers it in the panel.
Sourcepub fn resource_with<R: Resource>(
self,
customize: impl FnOnce(ResourceDef<R>) -> ResourceDef<R> + Send + 'static,
) -> Self
pub fn resource_with<R: Resource>( self, customize: impl FnOnce(ResourceDef<R>) -> ResourceDef<R> + Send + 'static, ) -> Self
Registers the Resource R in the group with customize adjusting its def, as
Panel::resource_with does.
Sourcepub fn page<P: Page>(self) -> Self
pub fn page<P: Page>(self) -> Self
Declares the Page P in the group, as Panel::page declares it
in the panel.
Sourcepub fn page_with<P: Page>(
self,
customize: impl FnOnce(PageDef) -> PageDef + Send + 'static,
) -> Self
pub fn page_with<P: Page>( self, customize: impl FnOnce(PageDef) -> PageDef + Send + 'static, ) -> Self
Declares the Page P in the group with customize adjusting its def, as
Panel::page_with does.
Sourcepub fn profile(self) -> Self
pub fn profile(self) -> Self
Moves the profile page Auth::profile installs into the group, at
{prefix}/{area}/profile. The user menu’s Profile entry follows it there.
Sourcepub fn profile_with(
self,
customize: impl FnOnce(PageDef) -> PageDef + Send + 'static,
) -> Self
pub fn profile_with( self, customize: impl FnOnce(PageDef) -> PageDef + Send + 'static, ) -> Self
Moves the profile page into the group as profile does, with customize
adjusting its def: its slug, label,
icon, navigation_order and
header_actions, which render in the form’s header and serve
at {url}/-/actions/{NAME} as a page’s do: deleting the account belongs there.
Auth renders the page’s form and decides who opens it, so mounting refuses a def that declares widgets, filters or an access check.
Sourcepub fn two_factor(self) -> Self
pub fn two_factor(self) -> Self
Moves the two-factor settings page Auth::two_factor installs
into the group, at {prefix}/{area}/two-factor. The user menu’s entry follows it there.
Sourcepub fn two_factor_with(
self,
customize: impl FnOnce(PageDef) -> PageDef + Send + 'static,
) -> Self
pub fn two_factor_with( self, customize: impl FnOnce(PageDef) -> PageDef + Send + 'static, ) -> Self
Moves the two-factor settings page into the group as two_factor
does, with customize adjusting its def as profile_with reads it,
but for header actions, which mounting refuses: the page renders no form header to hold
them.
Sourcepub fn tenant_profile(self) -> Self
pub fn tenant_profile(self) -> Self
Moves the tenant settings page Auth::tenant_profile
installs into the group, at {prefix}/{area}/tenant. The tenant menu’s entry follows it
there. The entry shows to a user who may edit the tenant the request acts for.
Sourcepub fn tenant_profile_with(
self,
customize: impl FnOnce(PageDef) -> PageDef + Send + 'static,
) -> Self
pub fn tenant_profile_with( self, customize: impl FnOnce(PageDef) -> PageDef + Send + 'static, ) -> Self
Moves the tenant settings page into the group as tenant_profile
does, with customize adjusting its def as profile_with reads it:
deleting the tenant is a header action of it.
Sourcepub fn audit_log(self) -> Self
pub fn audit_log(self) -> Self
Moves the list of the audit log Panel::audit_log keeps into
the group, at {prefix}/{area}/audit-log, with the def audit_log gave it. In a
tenant_group, the list sits beside the tenant’s members and billing.
Mounting refuses an area that places the log when the panel keeps none, and a second group that places it.