Skip to main content

Sizing

Trait Sizing 

Source
pub trait Sizing: Styled + Sized {
    // Provided method
    fn control_size(self, size: ControlSize) -> Self { ... }
}
Expand description

The size ladder, on anything styled — SwiftUI’s .controlSize(..), and Typeset’s shape for the metrics that come with a type role.

It carries horizontal padding, so a control whose width is its height instead (an icon button) is not one of these.

Provided Methods§

Source

fn control_size(self, size: ControlSize) -> Self

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<E: Styled> Sizing for E