#[non_exhaustive]pub enum Separator {
Space,
Theme,
Literal(Cow<'static, str>),
Powerline {
width: PowerlineWidth,
},
None,
}Expand description
Separator between adjacent segments. Chosen by the segment to its left; themes and user config can override.
Theme is reserved for theme-provided padding and renders as a
single space when no theme is configured. Literal carries a
Cow<'static, str> so built-ins stay zero-alloc while user config
allocates once. Powerline { width } emits the Nerd Font
right-arrow chevron (U+E0B0) flanked by single-space padding;
width is the chevron’s own cell count (1 or 2 — see
[layout_options].powerline_width), and the reported width()
includes the 2 padding cells. Chevron styling lives in
[crate::layout::separator_style].
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Implementations§
Source§impl Separator
impl Separator
Sourcepub const fn powerline() -> Self
pub const fn powerline() -> Self
Default 1-cell powerline chevron. Use this for the common case
(most modern Nerd Fonts render U+E0B0 as 1 cell at standard
sizes); pass Powerline { width: PowerlineWidth::Two } for
fonts/sizes that render 2 cells.
pub fn text(&self) -> &str
pub fn width(&self) -> u16
Trait Implementations§
impl Eq for Separator
impl StructuralPartialEq for Separator
Auto Trait Implementations§
impl Freeze for Separator
impl RefUnwindSafe for Separator
impl Send for Separator
impl Sync for Separator
impl Unpin for Separator
impl UnsafeUnpin for Separator
impl UnwindSafe for Separator
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.