pub trait LayoutControl: LayoutControl {
// Provided methods
fn width(self, value: impl Into<Option<f64>>) -> Self
where Self: Sized { ... }
fn height(self, value: impl Into<Option<f64>>) -> Self
where Self: Sized { ... }
fn min_width(self, value: impl Into<Option<f64>>) -> Self
where Self: Sized { ... }
fn max_width(self, value: impl Into<Option<f64>>) -> Self
where Self: Sized { ... }
fn min_height(self, value: impl Into<Option<f64>>) -> Self
where Self: Sized { ... }
fn max_height(self, value: impl Into<Option<f64>>) -> Self
where Self: Sized { ... }
fn opacity(self, value: impl Into<Option<f64>>) -> Self
where Self: Sized { ... }
fn horizontal_alignment(
self,
value: impl Into<Option<HorizontalAlignment>>,
) -> Self
where Self: Sized { ... }
fn vertical_alignment(
self,
value: impl Into<Option<VerticalAlignment>>,
) -> Self
where Self: Sized { ... }
fn margin(self, value: impl Into<Thickness>) -> Self
where Self: Sized { ... }
fn margin_optional<T>(self, value: Option<T>) -> Self
where Self: Sized,
T: Into<Thickness> { ... }
fn exit_transition(self, transition: ExitTransition) -> Self
where Self: Sized { ... }
}Expand description
Applies layout, opacity, margin, and exit-transition properties to native controls.
Dimensions, margins, and Canvas positions use device-independent pixels (DIPs). Passing
None to an optional property leaves it inherited or unset.
Provided Methods§
fn width(self, value: impl Into<Option<f64>>) -> Selfwhere
Self: Sized,
fn height(self, value: impl Into<Option<f64>>) -> Selfwhere
Self: Sized,
fn min_width(self, value: impl Into<Option<f64>>) -> Selfwhere
Self: Sized,
fn max_width(self, value: impl Into<Option<f64>>) -> Selfwhere
Self: Sized,
fn min_height(self, value: impl Into<Option<f64>>) -> Selfwhere
Self: Sized,
fn max_height(self, value: impl Into<Option<f64>>) -> Selfwhere
Self: Sized,
fn opacity(self, value: impl Into<Option<f64>>) -> Selfwhere
Self: Sized,
fn horizontal_alignment(
self,
value: impl Into<Option<HorizontalAlignment>>,
) -> Selfwhere
Self: Sized,
fn vertical_alignment(self, value: impl Into<Option<VerticalAlignment>>) -> Selfwhere
Self: Sized,
fn margin(self, value: impl Into<Thickness>) -> Selfwhere
Self: Sized,
fn margin_optional<T>(self, value: Option<T>) -> Self
fn exit_transition(self, transition: ExitTransition) -> Selfwhere
Self: Sized,
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".