pub struct LayoutState {
pub active: AtomicBool,
pub term_height: AtomicU16,
pub term_width: AtomicU16,
}Expand description
Shared state for terminal layout
Fields§
§active: AtomicBoolWhether layout is active
term_height: AtomicU16Terminal height when layout was set up
term_width: AtomicU16Terminal width
Implementations§
Source§impl LayoutState
impl LayoutState
pub fn new() -> Arc<Self>
pub fn is_active(&self) -> bool
pub fn height(&self) -> u16
pub fn width(&self) -> u16
Sourcepub fn status_line(&self) -> u16
pub fn status_line(&self) -> u16
Get the line number for status (1-indexed)
Sourcepub fn focus_line(&self) -> u16
pub fn focus_line(&self) -> u16
Get the line number for focus/detail (1-indexed)
Sourcepub fn input_line(&self) -> u16
pub fn input_line(&self) -> u16
Get the line number for input (1-indexed)
Trait Implementations§
Source§impl Debug for LayoutState
impl Debug for LayoutState
Auto Trait Implementations§
impl !Freeze for LayoutState
impl RefUnwindSafe for LayoutState
impl Send for LayoutState
impl Sync for LayoutState
impl Unpin for LayoutState
impl UnwindSafe for LayoutState
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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 moreCreates a shared type from an unshared type.