pub trait PositionView: View {
// Provided methods
fn top(self, y: Val) -> Self { ... }
fn left(self, x: Val) -> Self { ... }
fn right(self, x: Val) -> Self { ... }
fn bottom(self, y: Val) -> Self { ... }
fn position(self, x: Val, y: Val) -> Self { ... }
}Expand description
A trait that provides convenient absolute positioning methods for views.
Provided Methods§
Sourcefn top(self, y: Val) -> Self
fn top(self, y: Val) -> Self
Sets the top offset of the view in absolute positioning mode.
§Arguments
y- Vertical distance from the top edge of the parent container.
Sourcefn left(self, x: Val) -> Self
fn left(self, x: Val) -> Self
Sets the left offset of the view in absolute positioning mode.
§Arguments
x- Horizontal distance from the left edge of the parent container.
Sourcefn right(self, x: Val) -> Self
fn right(self, x: Val) -> Self
Sets the right offset of the view in absolute positioning mode.
§Arguments
x- Distance from the right edge of the parent container.
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.