Skip to main content

ContainerSizeExt

Trait ContainerSizeExt 

pub trait ContainerSizeExt: LayoutExt {
    // Provided methods
    fn width(self, width: impl Into<Size>) -> Self { ... }
    fn height(self, height: impl Into<Size>) -> Self { ... }
    fn expanded(self) -> Self { ... }
}
Expand description

Methods for setting an element’s width and height.

Provided Methods§

fn width(self, width: impl Into<Size>) -> Self

Set the element’s width. See Size.

fn height(self, height: impl Into<Size>) -> Self

Set the element’s height. See Size.

fn expanded(self) -> Self

Expand both width and height using Size::fill().

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.

Implementors§