pub struct Border {
pub style: BorderStyle,
pub top: Option<EdgeStyle>,
pub right: Option<EdgeStyle>,
pub bottom: Option<EdgeStyle>,
pub left: Option<EdgeStyle>,
}Expand description
A frame around a container: glyph family plus per-side Option<EdgeStyle>.
A side that is None is not drawn and reserves no row/column. A side that is
Some(_) reserves one row/column and is painted in the resolved fg.
Fields§
§style: BorderStyle§top: Option<EdgeStyle>§right: Option<EdgeStyle>§bottom: Option<EdgeStyle>§left: Option<EdgeStyle>Implementations§
Source§impl Border
impl Border
pub const DOUBLE: Border
pub const ROUNDED: Border
pub const fn single() -> Self
pub const fn rounded() -> Self
pub const fn double() -> Self
pub fn top(self, e: impl Into<EdgeStyle>) -> Self
pub fn right(self, e: impl Into<EdgeStyle>) -> Self
pub fn bottom(self, e: impl Into<EdgeStyle>) -> Self
pub fn left(self, e: impl Into<EdgeStyle>) -> Self
Sourcepub fn all<E: Into<EdgeStyle> + Copy>(self, e: E) -> Self
pub fn all<E: Into<EdgeStyle> + Copy>(self, e: E) -> Self
Enable every side with e. Copy bound lets callers pass () or a HlGroup.
pub fn any_side(&self) -> bool
Sourcepub fn single_all() -> Self
pub fn single_all() -> Self
Border::single().all(()) - single glyphs on all four sides, default color.
pub fn rounded_all() -> Self
pub fn double_all() -> Self
Trait Implementations§
impl Copy for Border
impl Eq for Border
impl StructuralPartialEq for Border
Auto Trait Implementations§
impl Freeze for Border
impl RefUnwindSafe for Border
impl Send for Border
impl Sync for Border
impl Unpin for Border
impl UnsafeUnpin for Border
impl UnwindSafe for Border
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