#[non_exhaustive]pub struct TableCard {
pub title: String,
pub subtitle: String,
pub image: Option<Image>,
pub column_properties: Vec<ColumnProperties>,
pub rows: Vec<TableCardRow>,
pub buttons: Vec<Button>,
/* private fields */
}Available on crate features
answer-records or intents or participants or sessions only.Expand description
Table card for Actions on Google.
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. Title of the card.
subtitle: StringOptional. Subtitle to the title.
image: Option<Image>Optional. Image which should be displayed on the card.
column_properties: Vec<ColumnProperties>Optional. Display properties for the columns in this table.
rows: Vec<TableCardRow>Optional. Rows in this table of data.
Optional. List of buttons for the card.
Implementations§
Source§impl TableCard
impl TableCard
pub fn new() -> Self
Sourcepub fn set_subtitle<T: Into<String>>(self, v: T) -> Self
pub fn set_subtitle<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_or_clear_image<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_image<T>(self, v: Option<T>) -> Self
Sourcepub fn set_column_properties<T, V>(self, v: T) -> Self
pub fn set_column_properties<T, V>(self, v: T) -> Self
Sets the value of column_properties.
§Example
ⓘ
use google_cloud_dialogflow_v2::model::intent::message::ColumnProperties;
let x = TableCard::new()
.set_column_properties([
ColumnProperties::default()/* use setters */,
ColumnProperties::default()/* use (different) setters */,
]);Trait Implementations§
impl StructuralPartialEq for TableCard
Auto Trait Implementations§
impl Freeze for TableCard
impl RefUnwindSafe for TableCard
impl Send for TableCard
impl Sync for TableCard
impl Unpin for TableCard
impl UnwindSafe for TableCard
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