Skip to main content

Module admin

Module admin 

Source
Expand description

The admin panel — Django Admin, Rust-flavoured.

Re-exports§

pub use audit::ensure_table;
pub use audit::for_object;
pub use audit::recent;
pub use audit::record;
pub use audit::ActionType;
pub use audit::AdminAction;
pub use audit::AuditEvent;
pub use audit::LogEntry;
pub use bulk::BulkActionContext;
pub use bulk::BulkActionFailure;
pub use bulk::BulkActionResult;
pub use filters::classify_field;
pub use filters::field_ui_metadata;
pub use filters::field_ui_metadata_with_relation;
pub use filters::format_relation_cell;
pub use filters::infer_filters;
pub use filters::infer_filters_with_relations;
pub use filters::mask_pii;
pub use filters::FieldRole;
pub use filters::FieldUI;
pub use filters::FilterDef;
pub use filters::FilterKind;
pub use modeladmin::BulkAction;
pub use modeladmin::Fieldset;
pub use modeladmin::ModelAdmin;
pub use modeladmin::SortDir;
pub use redact::redact_backup_code;
pub use redact::redact_mfa_secret;
pub use redact::redact_password;
pub use redact::redact_token;
pub use relations::InverseRelation;
pub use relations::RegistryError;
pub use relations::RelationRegistry;
pub use relations::ResolvedRelation;
pub use relations::RELATION_FILTER_DROPDOWN_CAP;

Modules§

audit
Admin action log — every create / update / delete driven through the admin writes a row to rustio_admin_actions. The audit trail powers two user-visible surfaces:
bulk
Public surface for project-defined bulk-action dispatch.
filters
Field classification + filter inference (renamed from intelligence per Section 4 of the strategic reset plan).
modeladmin
ModelAdmin — Django-style customisation surface.
redact
Sanitisation helpers for log lines, audit summaries, and error messages.
relations
Relation Intelligence Layer — runtime registry.

Structs§

Admin
Builder for the admin. Register models with .model::<M>(), then hand it to the router via register_admin_routes.
AdminEntry
Runtime metadata about one admin-registered model. Captures both the AdminModel static surface and the super::ModelAdmin customisation values at registration time, so handlers read every per-model knob from this struct instead of re-resolving traits.
AdminField
AdminRelation
AdminTheme
Project-level override patch for the admin chrome palette.
CellLink
One resolved foreign-key cell. The renderer turns this into <a href="/admin/{admin_name}/{id}/edit">…</a> around the cell’s display label.
EditRow
The raw field values used to pre-fill the edit form.
ListOpts
Per-request options for [AdminOps::list]. Empty / None fields mean “framework default”: no ordering override falls back to id DESC inside the runtime, no filters skips the WHERE clause, no limit fetches every row.
ListPage
Result of [AdminOps::list]: the requested page plus the total row count under the same WHERE clause (so handlers can render pagination footers without a separate query).
ListRow
A row as shown on the list page.
SiteBranding
Per-project admin branding — the user-facing identity layer.
UserProfileRow
One key-value row inside a UserProfileSection. Both fields are String so projects can format whatever shape they need. Rendered escaped — pass plain text; for arbitrary HTML, projects override the template block instead.
UserProfileSection
One labeled section rendered in the project-extension area of the built-in user profile page (admin/user_view.html — {% block project_user_fields %}). A project’s extension closure returns Vec<UserProfileSection> so it can contribute multiple disjoint areas in a single registration.

Enums§

FieldType

Traits§

AdminModel
What the #[derive(RustioAdmin)] macro produces for each struct.

Functions§

register_admin_routes