#[non_exhaustive]pub struct CardWithId {
pub card_id: String,
pub card: Option<Card>,
/* private fields */
}Expand description
A card in a Google Chat message.
Chat apps can create cards with app authentication. As part of the Developer Preview Program, if your Chat app authenticates as a user, it can create card messages. If your Chat app is not part of Developer Preview Program, it can’t create cards with user authentication.
To learn how to create a message that contains cards, see Send a message.
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.card_id: StringRequired if the message contains multiple cards. A unique identifier for a card in a message.
card: Option<Card>A card. Maximum size is 32 KB.
Implementations§
Source§impl CardWithId
impl CardWithId
Sourcepub fn set_card_id<T: Into<String>>(self, v: T) -> Self
pub fn set_card_id<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_or_clear_card<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_card<T>(self, v: Option<T>) -> Self
Trait Implementations§
Source§impl Clone for CardWithId
impl Clone for CardWithId
Source§fn clone(&self) -> CardWithId
fn clone(&self) -> CardWithId
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 CardWithId
impl Debug for CardWithId
Source§impl Default for CardWithId
impl Default for CardWithId
Source§fn default() -> CardWithId
fn default() -> CardWithId
Returns the “default value” for a type. Read more
Source§impl PartialEq for CardWithId
impl PartialEq for CardWithId
impl StructuralPartialEq for CardWithId
Auto Trait Implementations§
impl Freeze for CardWithId
impl RefUnwindSafe for CardWithId
impl Send for CardWithId
impl Sync for CardWithId
impl Unpin for CardWithId
impl UnsafeUnpin for CardWithId
impl UnwindSafe for CardWithId
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