pub struct View<'a> { /* private fields */ }Expand description
Configure the view.
Implementations§
Source§impl<'a> View<'a>
impl<'a> View<'a>
Sourcepub fn view_width(self, width: u16) -> Self
pub fn view_width(self, width: u16) -> Self
Width of the view buffer.
Sourcepub fn view_height(self, height: u16) -> Self
pub fn view_height(self, height: u16) -> Self
Width of the view buffer.
Sourcepub fn layout_size(&self, area: Rect, state: &ViewState) -> u16
pub fn layout_size(&self, area: Rect, state: &ViewState) -> u16
Calculate the layout width.
Sourcepub fn layout_width(&self, area: Rect, state: &ViewState) -> u16
pub fn layout_width(&self, area: Rect, state: &ViewState) -> u16
Calculate the layout width.
Sourcepub fn inner(&self, area: Rect, state: &ViewState) -> Rect
👎Deprecated since 2.3.0: use layout_size instead
pub fn inner(&self, area: Rect, state: &ViewState) -> Rect
Calculate the view area.
Sourcepub fn into_buffer(self, area: Rect, state: &mut ViewState) -> ViewBuffer<'a>
pub fn into_buffer(self, area: Rect, state: &mut ViewState) -> ViewBuffer<'a>
Calculates the layout and creates a temporary buffer.
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for View<'a>
impl<'a> RefUnwindSafe for View<'a>
impl<'a> Send for View<'a>
impl<'a> Sync for View<'a>
impl<'a> Unpin for View<'a>
impl<'a> UnwindSafe for View<'a>
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