pub struct CustomAction {
pub name: &'static str,
pub label: Option<&'static str>,
pub handler: ActionHandler,
}Expand description
Describes a custom action exposed by a resource.
Fields§
§name: &'static strURL/segment name, e.g. "publish".
label: Option<&'static str>Human label for the UI button (defaults to name).
handler: ActionHandlerServer-side handler.
Implementations§
Source§impl CustomAction
impl CustomAction
pub fn new(name: &'static str, handler: ActionHandler) -> Self
pub fn labeled( name: &'static str, label: &'static str, handler: ActionHandler, ) -> Self
pub fn display_label(&self) -> &'static str
Auto Trait Implementations§
impl Freeze for CustomAction
impl RefUnwindSafe for CustomAction
impl Send for CustomAction
impl Sync for CustomAction
impl Unpin for CustomAction
impl UnsafeUnpin for CustomAction
impl UnwindSafe for CustomAction
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