pub struct BorderTitle {
pub text: String,
pub edge: BorderEdge,
pub position: TitlePosition,
pub fg: Option<Color>,
pub bg: Option<Color>,
pub pad_start: u16,
pub pad_end: u16,
pub offset: i16,
}Expand description
A title or info section to draw on a border
Fields§
§text: StringText content (supports any chars including nerd font icons)
edge: BorderEdgeWhich edge to draw on
position: TitlePositionPosition along the edge
fg: Option<Color>Foreground color
bg: Option<Color>Background color (uses border bg if None)
pad_start: u16Padding before text
pad_end: u16Padding after text
offset: i16Offset from calculated position (can be negative via wrapping)
Implementations§
Source§impl BorderTitle
impl BorderTitle
Sourcepub fn edge(self, edge: BorderEdge) -> Self
pub fn edge(self, edge: BorderEdge) -> Self
Set the edge (top, bottom, left, right)
Sourcepub fn position(self, pos: TitlePosition) -> Self
pub fn position(self, pos: TitlePosition) -> Self
Set position along edge (start, center, end)
Trait Implementations§
Source§impl Clone for BorderTitle
impl Clone for BorderTitle
Source§fn clone(&self) -> BorderTitle
fn clone(&self) -> BorderTitle
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 moreAuto Trait Implementations§
impl Freeze for BorderTitle
impl RefUnwindSafe for BorderTitle
impl Send for BorderTitle
impl Sync for BorderTitle
impl Unpin for BorderTitle
impl UnwindSafe for BorderTitle
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> 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 more