#[non_exhaustive]pub struct BasicCard {
pub title: String,
pub subtitle: String,
pub formatted_text: String,
pub image: Option<Image>,
pub buttons: Vec<Button>,
/* private fields */
}Available on crate features
answer-records or intents or participants or sessions only.Expand description
The basic card message. Useful for displaying information.
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: StringOptional. The title of the card.
subtitle: StringOptional. The subtitle of the card.
formatted_text: StringRequired, unless image is present. The body text of the card.
image: Option<Image>Optional. The image for the card.
Optional. The collection of card buttons.
Implementations§
Source§impl BasicCard
impl BasicCard
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_formatted_text<T: Into<String>>(self, v: T) -> Self
pub fn set_formatted_text<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
Trait Implementations§
impl StructuralPartialEq for BasicCard
Auto Trait Implementations§
impl Freeze for BasicCard
impl RefUnwindSafe for BasicCard
impl Send for BasicCard
impl Sync for BasicCard
impl Unpin for BasicCard
impl UnwindSafe for BasicCard
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