pub struct LayoutOuter {
pub left: Option<Constraint>,
pub top: Option<Constraint>,
pub right: Option<Constraint>,
pub bottom: Option<Constraint>,
pub position: Option<Position>,
pub width: Option<Constraint>,
pub height: Option<Constraint>,
pub size: Option<Size>,
}Expand description
This lets you define the outer bounds of a target area.
The constraints are applied in this order.
- Constrain the left/right/top/bottom border outside the area.
- Set a fixed position.
- Constrain the width/height of the area.
- Set a fixed size.
In the end it gives you the middle Rect.
Fields§
§left: Option<Constraint>§top: Option<Constraint>§right: Option<Constraint>§bottom: Option<Constraint>§position: Option<Position>§width: Option<Constraint>§height: Option<Constraint>§size: Option<Size>Implementations§
Source§impl LayoutOuter
impl LayoutOuter
pub fn new() -> Self
Sourcepub fn left(self, left: Constraint) -> Self
pub fn left(self, left: Constraint) -> Self
Margin constraint for the left side.
Sourcepub fn top(self, top: Constraint) -> Self
pub fn top(self, top: Constraint) -> Self
Margin constraint for the top side.
Sourcepub fn right(self, right: Constraint) -> Self
pub fn right(self, right: Constraint) -> Self
Margin constraint for the right side.
Sourcepub fn bottom(self, bottom: Constraint) -> Self
pub fn bottom(self, bottom: Constraint) -> Self
Margin constraint for the bottom side.
Sourcepub fn width(self, width: Constraint) -> Self
pub fn width(self, width: Constraint) -> Self
Constraint for the width.
Sourcepub fn height(self, height: Constraint) -> Self
pub fn height(self, height: Constraint) -> Self
Constraint for the height.
Trait Implementations§
Source§impl Clone for LayoutOuter
impl Clone for LayoutOuter
Source§fn clone(&self) -> LayoutOuter
fn clone(&self) -> LayoutOuter
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for LayoutOuter
impl Debug for LayoutOuter
Source§impl Default for LayoutOuter
impl Default for LayoutOuter
Source§fn default() -> LayoutOuter
fn default() -> LayoutOuter
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for LayoutOuter
impl RefUnwindSafe for LayoutOuter
impl Send for LayoutOuter
impl Sync for LayoutOuter
impl Unpin for LayoutOuter
impl UnwindSafe for LayoutOuter
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more