pub enum StatuslineEmphasis {
Normal,
Dim,
Bold,
Success,
Warning,
Error,
Accent,
}Expand description
A generic, wire-safe (JSON, via serde) style hint an engine can attach
to a free-form statusline segment (StatuslineSegment::Custom/
StatuslineSegment::Chrome).
Why: tagent’s statusline (crates/trusty-agents/src/repl/tui/status.rs,
NOT migrated to this crate — see crate::widgets::status_line’s module
doc comment) has real chrome this crate’s Slice 1.5 segment set couldn’t
express at all: a bold-cyan bracket prefix, green success framing, and a
bold/dim distinction between two otherwise-identical Custom-shaped
segments (TM: N sessions vs MPM: N sessions). Without a style hook,
Slice 10’s tagent cutover would have no way to reproduce that chrome
through this crate’s widgets — a silent UX regression Slice 10 wouldn’t
discover until it tried. This enum is deliberately independent of any
terminal-rendering library (crate::model has zero terminal-library
dependency, by design, per the crate root doc comment — even though
trusty-code-tui as a whole now depends on ratatui) so it stays JSON-safe
for an HTTP-transported engine (CodeEngine, Slice 3) and so this module
never needs a ratatui::style::Color/Modifier in its public API.
What: a small, closed set of semantic emphases — not raw RGB/attribute
bits — so an engine names what kind of emphasis it wants (Success,
Accent, …) and crate::widgets::status_line owns the actual
ratatui::style::Style each maps to. Normal (the default) renders
exactly like today’s unstyled segments, so this is purely additive.
Variants§
Normal
No special styling — today’s default rendering.
Dim
De-emphasized (tagent’s Modifier::DIM).
Bold
Emphasized (tagent’s Modifier::BOLD).
Success
A positive/OK signal (tagent’s green “✓ … All systems go.”).
Warning
A caution signal.
Error
A problem signal.
Accent
The product’s accent color (tagent’s bold-cyan "[trusty-agents] "
bracket prefix).
Trait Implementations§
Source§impl Clone for StatuslineEmphasis
impl Clone for StatuslineEmphasis
impl Copy for StatuslineEmphasis
Source§impl Debug for StatuslineEmphasis
impl Debug for StatuslineEmphasis
Source§impl Default for StatuslineEmphasis
impl Default for StatuslineEmphasis
Source§impl<'de> Deserialize<'de> for StatuslineEmphasis
impl<'de> Deserialize<'de> for StatuslineEmphasis
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for StatuslineEmphasis
Source§impl PartialEq for StatuslineEmphasis
impl PartialEq for StatuslineEmphasis
Source§impl Serialize for StatuslineEmphasis
impl Serialize for StatuslineEmphasis
impl StructuralPartialEq for StatuslineEmphasis
Auto Trait Implementations§
impl Freeze for StatuslineEmphasis
impl RefUnwindSafe for StatuslineEmphasis
impl Send for StatuslineEmphasis
impl Sync for StatuslineEmphasis
impl Unpin for StatuslineEmphasis
impl UnsafeUnpin for StatuslineEmphasis
impl UnwindSafe for StatuslineEmphasis
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
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