pub trait ButtonVariants: Sized {
// Required method
fn with_variant(self, variant: ButtonVariant) -> Self;
// Provided methods
fn primary(self) -> Self { ... }
fn secondary(self) -> Self { ... }
fn danger(self) -> Self { ... }
fn warning(self) -> Self { ... }
fn success(self) -> Self { ... }
fn info(self) -> Self { ... }
fn ghost(self) -> Self { ... }
fn link(self) -> Self { ... }
fn text(self) -> Self { ... }
fn custom(self, style: ButtonCustomVariant) -> Self { ... }
}Required Methods§
fn with_variant(self, variant: ButtonVariant) -> Self
Provided Methods§
Sourcefn text(self) -> Self
fn text(self) -> Self
With the text style for the Button, it will no padding look like a normal text.
Sourcefn custom(self, style: ButtonCustomVariant) -> Self
fn custom(self, style: ButtonCustomVariant) -> Self
With the custom style for the Button.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".