Trait SizeExt

Source
pub trait SizeExt {
    // Required methods
    fn auto() -> Size;
    fn fill() -> Size;
    fn fill_minimum() -> Size;
    fn percent(percent: impl Into<f32>) -> Size;
    fn px(px: impl Into<f32>) -> Size;
    fn window_percent(percent: impl Into<f32>) -> Size;
    fn flex(flex: impl Into<f32>) -> Size;
    fn func(
        func: impl Fn(SizeFnContext) -> Option<f32> + Sync + Send + 'static,
    ) -> Size;
    fn func_data<D>(
        func: impl Fn(SizeFnContext) -> Option<f32> + Sync + Send + 'static,
        data: &D,
    ) -> Size
       where D: Hash;
}

Required Methods§

Source

fn auto() -> Size

Source

fn fill() -> Size

Source

fn fill_minimum() -> Size

Source

fn percent(percent: impl Into<f32>) -> Size

Source

fn px(px: impl Into<f32>) -> Size

Source

fn window_percent(percent: impl Into<f32>) -> Size

Source

fn flex(flex: impl Into<f32>) -> Size

Source

fn func( func: impl Fn(SizeFnContext) -> Option<f32> + Sync + Send + 'static, ) -> Size

Source

fn func_data<D>( func: impl Fn(SizeFnContext) -> Option<f32> + Sync + Send + 'static, data: &D, ) -> Size
where D: Hash,

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 SizeExt for Size

Source§

fn auto() -> Size

Source§

fn fill() -> Size

Source§

fn fill_minimum() -> Size

Source§

fn percent(percent: impl Into<f32>) -> Size

Source§

fn px(px: impl Into<f32>) -> Size

Source§

fn window_percent(percent: impl Into<f32>) -> Size

Source§

fn flex(flex: impl Into<f32>) -> Size

Source§

fn func( func: impl Fn(SizeFnContext) -> Option<f32> + Sync + Send + 'static, ) -> Size

Source§

fn func_data<D>( func: impl Fn(SizeFnContext) -> Option<f32> + Sync + Send + 'static, data: &D, ) -> Size
where D: Hash,

Implementors§