Skip to main content

StatuslineEmphasis

Enum StatuslineEmphasis 

Source
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

Source§

fn clone(&self) -> StatuslineEmphasis

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for StatuslineEmphasis

Source§

impl Debug for StatuslineEmphasis

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for StatuslineEmphasis

Source§

fn default() -> StatuslineEmphasis

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for StatuslineEmphasis

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Eq for StatuslineEmphasis

Source§

impl PartialEq for StatuslineEmphasis

Source§

fn eq(&self, other: &StatuslineEmphasis) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl Serialize for StatuslineEmphasis

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for StatuslineEmphasis

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

Converts 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
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more