CornerRadiusExt

Trait CornerRadiusExt 

pub trait CornerRadiusExt: Sized {
    // Required method
    fn with_corner_radius(self, corner_radius: f32) -> Self;

    // Provided methods
    fn rounded_none(self) -> Self { ... }
    fn rounded(self) -> Self { ... }
    fn rounded_sm(self) -> Self { ... }
    fn rounded_md(self) -> Self { ... }
    fn rounded_lg(self) -> Self { ... }
    fn rounded_xl(self) -> Self { ... }
    fn rounded_2xl(self) -> Self { ... }
    fn rounded_3xl(self) -> Self { ... }
    fn rounded_4xl(self) -> Self { ... }
    fn rounded_full(self) -> Self { ... }
}

Required Methods§

fn with_corner_radius(self, corner_radius: f32) -> Self

Provided Methods§

fn rounded_none(self) -> Self

Shortcut for corner_radius(0.) - removes border radius.

fn rounded(self) -> Self

Shortcut for corner_radius(6.) - default border radius.

fn rounded_sm(self) -> Self

Shortcut for corner_radius(4.) - small border radius.

fn rounded_md(self) -> Self

Shortcut for corner_radius(6.) - medium border radius.

fn rounded_lg(self) -> Self

Shortcut for corner_radius(8.) - large border radius.

fn rounded_xl(self) -> Self

Shortcut for corner_radius(12.) - extra large border radius.

fn rounded_2xl(self) -> Self

Shortcut for corner_radius(16.) - extra large border radius.

fn rounded_3xl(self) -> Self

Shortcut for corner_radius(24.) - extra large border radius.

fn rounded_4xl(self) -> Self

Shortcut for corner_radius(32.) - extra large border radius.

fn rounded_full(self) -> Self

Shortcut for corner_radius(99.) - fully rounded (pill shape).

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl CornerRadiusExt for Button

Source§

fn with_corner_radius(self, corner_radius: f32) -> Button

Source§

impl CornerRadiusExt for Card

Source§

fn with_corner_radius(self, corner_radius: f32) -> Card

Source§

impl CornerRadiusExt for Input

Source§

fn with_corner_radius(self, corner_radius: f32) -> Input

Implementors§

§

impl<T> CornerRadiusExt for T
where T: StyleExt,