pub enum StyleValue {
Concrete(Style),
Alias(String),
}Expand description
A style value that can be either a concrete style or an alias to another style.
This enables layered styling where semantic styles can reference presentation styles, which in turn reference visual styles with concrete formatting.
§Example
use standout::{Theme, StyleValue};
use console::Style;
let theme = Theme::new()
// Visual layer - concrete styles
.add("muted", Style::new().dim())
.add("accent", Style::new().cyan().bold())
// Presentation layer - aliases to visual
.add("disabled", "muted")
// Semantic layer - aliases to presentation
.add("timestamp", "disabled");Variants§
Concrete(Style)
A concrete style with actual formatting (colors, bold, etc.)
Alias(String)
An alias referencing another style by name
Trait Implementations§
Source§impl Clone for StyleValue
impl Clone for StyleValue
Source§fn clone(&self) -> StyleValue
fn clone(&self) -> StyleValue
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for StyleValue
impl Debug for StyleValue
Source§impl From<&str> for StyleValue
impl From<&str> for StyleValue
Source§impl From<String> for StyleValue
impl From<String> for StyleValue
Auto Trait Implementations§
impl Freeze for StyleValue
impl RefUnwindSafe for StyleValue
impl Send for StyleValue
impl Sync for StyleValue
impl Unpin for StyleValue
impl UnwindSafe for StyleValue
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