Skip to main content

Module bulk

Module bulk 

Source
Expand description

Public surface for project-defined bulk-action dispatch.

The framework owns the metadata declaration (super::BulkAction) and the rendering / confirmation flow; projects own what each action actually does. This module carries the three types that cross the public boundary between framework and project:

  • BulkActionContext — what the framework hands to the project’s handler (actor, correlation-id, client IP). Narrow by design; #[non_exhaustive] keeps it SemVer-safe.
  • BulkActionResult — what the project hands back. Carries a succeeded count, an optional per-id failure list, and an operator-facing summary line.
  • BulkActionFailure — one row that failed inside an otherwise-successful batch.

The dispatcher itself is super::ModelAdmin::execute_bulk_action. See its docstring for the contract; see DESIGN_CHROME.md for the bulk-bar’s visual conventions.

The framework emits one audit::record row per submission after the project’s handler returns. Projects don’t need to call audit::record themselves for the dispatch envelope; any business-level audit emissions inside the action body are still the project’s call.

Structs§

BulkActionContext
Per-request context the framework passes into project-side super::ModelAdmin::execute_bulk_action implementations.
BulkActionFailure
One row that failed inside an otherwise-successful bulk batch.
BulkActionResult
Outcome of a project-defined bulk action.