pub struct Style {
pub fg: Color,
pub bg: Color,
pub bold: bool,
pub dim: bool,
pub italic: bool,
pub underline: bool,
pub reverse: bool,
pub blink: bool,
pub conceal: bool,
pub strikethrough: bool,
}Expand description
Visual attributes of a Cell.
Inspect them per cell via Cell::style, or snapshot them wholesale
with Screen::with_styles (plain snapshots stay text-only).
Fields§
§fg: ColorForeground color.
bg: ColorBackground color.
bold: boolBold / increased intensity.
dim: boolDim / decreased intensity.
italic: boolItalic.
underline: boolUnderline.
reverse: boolReverse video (foreground and background swapped).
blink: boolBlinking (SGR 5/6; the two rates are not distinguished).
conceal: boolConcealed: the cell holds text the terminal does not display
(SGR 8) — a masked password field, typically.
This is the attribute worth checking explicitly. Without it, a test
asserting that a field is masked passes just as happily against an
application that printed the secret in clear, because the two
renderings are identical in the grid. Screen::cell still reports
the underlying text, exactly as a real terminal holds it — what
changes is that you can now tell the difference.
strikethrough: boolStruck through (SGR 9).
Trait Implementations§
impl Copy for Style
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.