#[non_exhaustive]pub struct Button {
pub title: String,
pub open_uri_action: Option<OpenUriAction>,
/* private fields */
}Available on crate features
answer-records or intents or participants or sessions only.Expand description
The button object that appears at the bottom of a card.
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.title: StringRequired. The title of the button.
open_uri_action: Option<OpenUriAction>Required. Action to take when a user taps on the button.
Implementations§
Source§impl Button
impl Button
pub fn new() -> Self
Sourcepub fn set_open_uri_action<T>(self, v: T) -> Selfwhere
T: Into<OpenUriAction>,
pub fn set_open_uri_action<T>(self, v: T) -> Selfwhere
T: Into<OpenUriAction>,
Sets the value of open_uri_action.
§Example
ⓘ
use google_cloud_dialogflow_v2::model::intent::message::basic_card::button::OpenUriAction;
let x = Button::new().set_open_uri_action(OpenUriAction::default()/* use setters */);Sourcepub fn set_or_clear_open_uri_action<T>(self, v: Option<T>) -> Selfwhere
T: Into<OpenUriAction>,
pub fn set_or_clear_open_uri_action<T>(self, v: Option<T>) -> Selfwhere
T: Into<OpenUriAction>,
Sets or clears the value of open_uri_action.
§Example
ⓘ
use google_cloud_dialogflow_v2::model::intent::message::basic_card::button::OpenUriAction;
let x = Button::new().set_or_clear_open_uri_action(Some(OpenUriAction::default()/* use setters */));
let x = Button::new().set_or_clear_open_uri_action(None::<OpenUriAction>);Trait Implementations§
impl StructuralPartialEq for Button
Auto Trait Implementations§
impl Freeze for Button
impl RefUnwindSafe for Button
impl Send for Button
impl Sync for Button
impl Unpin for Button
impl UnwindSafe for Button
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