Struct rat_widget::statusline::StatusLine
source · pub struct StatusLine { /* private fields */ }Expand description
Basic status line with multiple sections.
Implementations§
source§impl StatusLine
impl StatusLine
sourcepub fn new() -> StatusLine
pub fn new() -> StatusLine
New widget.
sourcepub fn layout<It, Item>(self, widths: It) -> StatusLine
pub fn layout<It, Item>(self, widths: It) -> StatusLine
Layout for the sections.
This layout determines the number of sections. If the styles or the statustext vec differ defaults are used.
sourcepub fn styles(
self,
style: impl IntoIterator<Item = impl Into<Style>>,
) -> StatusLine
pub fn styles( self, style: impl IntoIterator<Item = impl Into<Style>>, ) -> StatusLine
Styles for each section.
Trait Implementations§
source§impl Clone for StatusLine
impl Clone for StatusLine
source§fn clone(&self) -> StatusLine
fn clone(&self) -> StatusLine
Returns a copy 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 StatusLine
impl Debug for StatusLine
source§impl Default for StatusLine
impl Default for StatusLine
source§fn default() -> StatusLine
fn default() -> StatusLine
Returns the “default value” for a type. Read more
source§impl StatefulWidget for StatusLine
impl StatefulWidget for StatusLine
§type State = StatusLineState
type State = StatusLineState
State associated with the stateful widget. Read more
source§fn render(
self,
area: Rect,
buf: &mut Buffer,
state: &mut <StatusLine as StatefulWidget>::State,
)
fn render( self, area: Rect, buf: &mut Buffer, state: &mut <StatusLine as StatefulWidget>::State, )
Draws the current state of the widget in the given buffer. That is the only method required
to implement a custom stateful widget.
source§impl StatefulWidgetRef for StatusLine
impl StatefulWidgetRef for StatusLine
§type State = StatusLineState
type State = StatusLineState
State associated with the stateful widget. Read more
source§fn render_ref(
&self,
area: Rect,
buf: &mut Buffer,
state: &mut <StatusLine as StatefulWidgetRef>::State,
)
fn render_ref( &self, area: Rect, buf: &mut Buffer, state: &mut <StatusLine as StatefulWidgetRef>::State, )
Draws the current state of the widget in the given buffer. That is the only method required
to implement a custom stateful widget.
Auto Trait Implementations§
impl Freeze for StatusLine
impl RefUnwindSafe for StatusLine
impl Send for StatusLine
impl Sync for StatusLine
impl Unpin for StatusLine
impl UnwindSafe for StatusLine
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> 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