Struct ui::Button
zaun_client::ui::Button · Struct
pub struct Button(…)A button: one that sends an interaction (custom_id), or a link the reader confirms.
Methods
Section titled “Methods”primary
Section titled “primary”pub fn primary<impl Into<String>, impl Into<String>>(custom_id: impl Into<String>, label: impl Into<String>) -> SelfA blue button.
secondary
Section titled “secondary”pub fn secondary<impl Into<String>, impl Into<String>>(custom_id: impl Into<String>, label: impl Into<String>) -> SelfA grey button.
success
Section titled “success”pub fn success<impl Into<String>, impl Into<String>>(custom_id: impl Into<String>, label: impl Into<String>) -> SelfA green button.
danger
Section titled “danger”pub fn danger<impl Into<String>, impl Into<String>>(custom_id: impl Into<String>, label: impl Into<String>) -> SelfA red button.
pub fn link<impl Into<String>, impl Into<String>>(url: impl Into<String>, label: impl Into<String>) -> SelfA link (https:// only); readers confirm before it opens.
pub fn emoji<impl Into<String>>(self, emoji: impl Into<String>) -> SelfAdds a Unicode emoji.
disabled
Section titled “disabled”pub const fn disabled(self, disabled: bool) -> SelfShown but not clickable.
pub fn build(self) -> ComponentThe component.
Trait implementations
Section titled “Trait implementations”Clone, Debug, Eq, PartialEq, StructuralPartialEq