pub struct BulkAction {
pub name: &'static str,
pub label: &'static str,
pub destructive: bool,
pub confirm: bool,
}Expand description
One project-defined bulk action declared by
ModelAdmin::bulk_actions. Static metadata only — see
AdminOps::execute_bulk_action for the runtime dispatcher.
Fields§
§name: &'static strStable URL slug. Routed at POST /admin/:model/bulk/:name.
Use snake_case identifiers; the framework reserves delete
for its built-in cascade-aware delete (handled separately at
/bulk_delete).
label: &'static strHuman-readable button label. Rendered as-is in the bulk bar and on the confirmation page header.
destructive: booltrue → render the button with the framework’s destructive
(red) styling. Use for actions that lose data or change state
in a hard-to-undo way.
confirm: booltrue → POST shows a confirmation page first listing every
selected row; the user must click again to commit. false →
execute on the first POST. Default in the recommended call
pattern is true for any action a user might regret.
Trait Implementations§
Source§impl Clone for BulkAction
impl Clone for BulkAction
Source§fn clone(&self) -> BulkAction
fn clone(&self) -> BulkAction
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for BulkAction
impl Debug for BulkAction
impl Copy for BulkAction
Auto Trait Implementations§
impl Freeze for BulkAction
impl RefUnwindSafe for BulkAction
impl Send for BulkAction
impl Sync for BulkAction
impl Unpin for BulkAction
impl UnsafeUnpin for BulkAction
impl UnwindSafe for BulkAction
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more