Skip to main content

ButtonVariants

Trait ButtonVariants 

Source
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§

Source

fn with_variant(self, variant: ButtonVariant) -> Self

Provided Methods§

Source

fn primary(self) -> Self

With the primary style for the Button.

Source

fn secondary(self) -> Self

With the secondary style for the Button.

Source

fn danger(self) -> Self

With the danger style for the Button.

Source

fn warning(self) -> Self

With the warning style for the Button.

Source

fn success(self) -> Self

With the success style for the Button.

Source

fn info(self) -> Self

With the info style for the Button.

Source

fn ghost(self) -> Self

With the ghost style for the Button.

With the link style for the Button.

Source

fn text(self) -> Self

With the text style for the Button, it will no padding look like a normal text.

Source

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".

Implementors§