#[non_exhaustive]pub struct FormAction {
pub action_method_name: String,
pub parameters: Vec<ActionParameter>,
/* private fields */
}Expand description
A form action describes the behavior when the form is submitted. For example, you can invoke Apps Script to handle the form.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.action_method_name: StringThe method name is used to identify which part of the form triggered the form submission. This information is echoed back to the Chat app as part of the card click event. You can use the same method name for several elements that trigger a common behavior.
parameters: Vec<ActionParameter>List of action parameters.
Implementations§
Source§impl FormAction
impl FormAction
Sourcepub fn set_action_method_name<T: Into<String>>(self, v: T) -> Self
pub fn set_action_method_name<T: Into<String>>(self, v: T) -> Self
Sets the value of action_method_name.
§Example
ⓘ
let x = FormAction::new().set_action_method_name("example");Sourcepub fn set_parameters<T, V>(self, v: T) -> Self
pub fn set_parameters<T, V>(self, v: T) -> Self
Sets the value of parameters.
§Example
ⓘ
use google_chat_v1::model::widget_markup::form_action::ActionParameter;
let x = FormAction::new()
.set_parameters([
ActionParameter::default()/* use setters */,
ActionParameter::default()/* use (different) setters */,
]);Trait Implementations§
Source§impl Clone for FormAction
impl Clone for FormAction
Source§fn clone(&self) -> FormAction
fn clone(&self) -> FormAction
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for FormAction
impl Debug for FormAction
Source§impl Default for FormAction
impl Default for FormAction
Source§fn default() -> FormAction
fn default() -> FormAction
Returns the “default value” for a type. Read more
Source§impl PartialEq for FormAction
impl PartialEq for FormAction
impl StructuralPartialEq for FormAction
Auto Trait Implementations§
impl Freeze for FormAction
impl RefUnwindSafe for FormAction
impl Send for FormAction
impl Sync for FormAction
impl Unpin for FormAction
impl UnsafeUnpin for FormAction
impl UnwindSafe for FormAction
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