pub struct Button {
pub id: Option<String>,
pub label: String,
pub style: Style,
pub action: Action,
}Expand description
One button or chip: a label and what a click does.
Fields§
§id: Option<String>Stable per message (MSC4139 prompt id): 1 to 64 of [A-Za-z0-9_.:-].
Echoed as com.ianm.mtrix.used.id on send clicks.
label: StringThe text on the button, 1..=MAX_LABEL characters.
style: StyleHow the button is drawn (ignored on chips).
action: ActionWhat a click does.
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Button
impl<'de> Deserialize<'de> for Button
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for Button
impl StructuralPartialEq for Button
Auto Trait Implementations§
impl Forget for Button
impl Freeze for Button
impl RefUnwindSafe for Button
impl Send for Button
impl Sync for Button
impl Unpin for Button
impl UnsafeUnpin 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