pub struct Grid {
pub widths: Vec<Constraint>,
pub heights: Vec<Constraint>,
pub border_type: BorderType,
pub border_style: Style,
}Fields§
§widths: Vec<Constraint>§heights: Vec<Constraint>§border_type: BorderType§border_style: StyleImplementations§
Source§impl Grid
impl Grid
pub fn new( widths: Vec<Constraint>, heights: Vec<Constraint>, ) -> Result<Self, GridError>
Source§impl Grid
impl Grid
pub fn chunks(&self, area: Rect) -> Result<Vec<Vec<Rect>>, GridError>
pub fn lines(position: u16, lengths: &[u16]) -> Vec<u16>
pub fn heights(&self, height: u16) -> Result<Vec<u16>, GridError>
pub fn widths(&self, width: u16) -> Result<Vec<u16>, GridError>
pub fn lengths( constraints: &[Constraint], length: u16, ) -> Result<Vec<u16>, GridError>
Source§impl Grid
impl Grid
pub fn border_type(self, border_type: BorderType) -> Self
pub fn set_border_type(&mut self, border_type: BorderType)
pub fn border_style(self, border_style: Style) -> Self
pub fn set_border_style(&mut self, border_style: Style)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Grid
impl RefUnwindSafe for Grid
impl Send for Grid
impl Sync for Grid
impl Unpin for Grid
impl UnwindSafe for Grid
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