pub struct PieceStyle {Show 18 fields
pub content: Style,
pub secondary: Style,
pub muted: Style,
pub info: Style,
pub success: Style,
pub warning: Style,
pub danger: Style,
pub page: Style,
pub section: Style,
pub subsection: Style,
pub action: Style,
pub filled: Style,
pub sunken: Style,
pub focus: Modifier,
pub meter_cells: u16,
pub meter_full: char,
pub meter_empty: char,
pub required_marker: &'static str,
}Expand description
The colours and marks the drawings below use.
TableStyle’s shape, for its reasons: an
ungated struct of styles with a Default, plus a
from_theme that is what a consumer holding a loaded
theme should reach for first. A consumer painting bevels and nothing else
should not have to supply text tones it never uses, and gating the whole
module on theme would make these unreachable to anyone hand-picking
colours.
The default is the one that survives a terminal with no colour at all:
modifiers only, no foreground anywhere. That is not a placeholder. A
two-colour terminal is the case where a Style carrying a foreground is a
foreground that will not land, and bold-and-reversed is what is left.
Fields§
§content: StyleOrdinary content, and what Tone::Neutral reads as.
secondary: StyleContent one step back: a field’s label, a quoted run.
muted: StyleContent two steps back: a caption, a hint, a meter’s reading.
info: StyleSomething worth knowing and nothing to do about it.
success: StyleSomething finished and it worked.
warning: StyleSomething the user should look at.
danger: StyleSomething broken, or about to be destroyed.
page: StyleA page title.
section: StyleA section title.
subsection: StyleA subsection title.
action: StyleText that goes somewhere, and a control’s label.
filled: StyleA control filled with the action colour, for the one on a screen that is the thing to press. A form’s submit is the case that has it.
sunken: StyleA surface set back from the one it sits on, by colour and nothing else. What a code run takes, since every cell is monospace and the thing a webview says with a typeface cannot be said that way here.
focus: ModifierWhat “you are on this one” adds to whatever it lands on.
Reversed video by default, which is the affordance a cell has left once colour is spent on tone and bold on weight. A webview says it with an outline; a terminal has no outline that is not four more cells.
meter_cells: u16How many cells meter spends on its bar.
meter_full: charThe filled part of a bar.
meter_empty: charThe empty part of a bar.
required_marker: &'static strWhat marks a compulsory field, appended to its label.
A knob for makeover-immediate’s reason: it is the one piece of copy
here, and copy is not a renderer’s call.
Implementations§
Trait Implementations§
Source§impl Clone for PieceStyle
impl Clone for PieceStyle
Source§fn clone(&self) -> PieceStyle
fn clone(&self) -> PieceStyle
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for PieceStyle
Source§impl Debug for PieceStyle
impl Debug for PieceStyle
Source§impl Default for PieceStyle
impl Default for PieceStyle
impl Eq for PieceStyle
Source§impl PartialEq for PieceStyle
impl PartialEq for PieceStyle
impl StructuralPartialEq for PieceStyle
Auto Trait Implementations§
impl Freeze for PieceStyle
impl RefUnwindSafe for PieceStyle
impl Send for PieceStyle
impl Sync for PieceStyle
impl Unpin for PieceStyle
impl UnsafeUnpin for PieceStyle
impl UnwindSafe for PieceStyle
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§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.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> ⓘ
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> ⓘ
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