#[non_exhaustive]pub struct Action { /* private fields */ }Expand description
A button that sends a request: in each row’s menu (Grid::row_action)
or over the selected rows (Grid::bulk_action).
Implementations§
Source§impl Action
impl Action
Sourcepub fn new(label: &str, url: &str) -> Self
pub fn new(label: &str, url: &str) -> Self
An action that POSTs to url ({id} is the row’s id in row
actions).
Sourcepub fn link(label: &str, url: &str) -> Self
pub fn link(label: &str, url: &str) -> Self
A link to url instead of a request (row actions: Edit, Open).
Sourcepub fn method(self, method: &str) -> Self
pub fn method(self, method: &str) -> Self
The request’s method: POST (the default), PATCH, PUT or
DELETE.
Sourcepub fn sheet(self, id: &str) -> Self
pub fn sheet(self, id: &str) -> Self
Opens the dialog id (a kit action_sheet, elsewhere on the page)
instead of sending the request at once: the grid points the sheet’s
form at this action’s url, adds the selection (ids, all) and
shows it, so the action can ask for input first. Use it with
action_sheet(id, …, button=false).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Action
impl RefUnwindSafe for Action
impl Send for Action
impl Sync for Action
impl Unpin for Action
impl UnsafeUnpin for Action
impl UnwindSafe for Action
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
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
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> ⓘ
Converts
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> ⓘ
Converts
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