pub struct Style {
pub cell: StyleCell,
pub ignore: bool,
pub fill: Colour,
pub align: StyleAlign,
pub list: StyleList,
pub range: StyleRange,
pub width: Option<StyleWidth>,
pub pad: Option<u32>,
pub default_type: StyleDefaultType,
}Expand description
Full tmux style state.
Fields§
§cell: StyleCellGrid-cell colours and attributes.
ignore: boolIgnore flag used by format_draw.
fill: ColourFill colour applied to the entire rendered area.
align: StyleAlignHorizontal alignment directive.
list: StyleListList state directive.
range: StyleRangeActive range descriptor.
width: Option<StyleWidth>Optional width override.
pad: Option<u32>Optional pad override.
default_type: StyleDefaultTypeDefault stack action.
Implementations§
Source§impl Style
impl Style
Sourcepub fn parse(input: &str) -> Result<Self, StyleParseError>
pub fn parse(input: &str) -> Result<Self, StyleParseError>
Parses a standalone style string using tmux’s default base cell.
Sourcepub fn parse_in_place(
&mut self,
base: &StyleCell,
input: &str,
) -> Result<(), StyleParseError>
pub fn parse_in_place( &mut self, base: &StyleCell, input: &str, ) -> Result<(), StyleParseError>
Applies input onto the current style using base for default
resets.
Sourcepub fn applied(
&self,
base: &StyleCell,
input: &str,
) -> Result<Self, StyleParseError>
pub fn applied( &self, base: &StyleCell, input: &str, ) -> Result<Self, StyleParseError>
Returns a parsed copy of the current style.
Sourcepub fn overlaid(&self, input: &str) -> Result<Self, StyleParseError>
pub fn overlaid(&self, input: &str) -> Result<Self, StyleParseError>
Returns a parsed copy of the current style using the current cell as the
additive base for default resets.
Trait Implementations§
impl Eq for Style
impl StructuralPartialEq for Style
Auto Trait Implementations§
impl Freeze for Style
impl RefUnwindSafe for Style
impl Send for Style
impl Sync for Style
impl Unpin for Style
impl UnsafeUnpin for Style
impl UnwindSafe for Style
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