Skip to main content

Module resource

Module resource 

Source
Expand description

Resource — maps one Toasty Model to its admin UI.

Structs§

Committed
What one committed mutation wrote.
Relation
One relation of a parent resource’s records.
ResourceDef
What a Resource declares: its names, navigation, policy, tenancy, table, form, view, relations and actions.

Enums§

Mutation
The kind of mutation a record fn performed.

Traits§

Action
A mutation beyond create, update and delete: “publish”, “archive”, “resend the invite”.
ForeignKey
A foreign-key column type referencing a primary key of type K: K itself, or Option<K> for an optional reference. Sealed: these are the only two.
Resource
Maps one Toasty Model to its admin UI.

Functions§

can
Whether R’s policy, as the request’s panel mounted it, allows ability; false when the panel does not mount R, and R’s own declare answers for a context with no panel at all. Does not check sign-in or tenant scope.
scoped_query
The tenant-scoped base query.
scoped_view_query
Resource::view_query under the same tenant gate and filter as scoped_query: the detail page’s loader, and the entry point for a page that owns its own detail view.
write_create
The derived create: the form’s builder, the request tenant stamped on the resource’s Tenancy::column, executed through ex.
write_update
The derived update: assign every named field and execute through ex.