pub struct TerminalCaps {
pub tty: bool,
pub colors: bool,
pub spinner: bool,
pub bracketed_paste: bool,
pub raw_mode: bool,
pub scroll_region: bool,
pub unicode_symbols: bool,
}Fields§
§tty: boolstdout is a TTY (vs. pipe/redirect/CI).
colors: boolEmit SGR colour codes.
spinner: boolShow animated spinner (requires overwritable current line).
bracketed_paste: boolEnable bracketed paste mode (DECSET 2004).
raw_mode: boolRaw mode for key-by-key input.
scroll_region: boolDECSTBM scroll region support (\x1b[top;bot r) — lets us pin a
fixed-footer area at the bottom and have streaming content scroll
only in the upper region. VT100+ standard; supported by every
modern emulator (Terminal.app, iTerm2, Alacritty, WezTerm, Windows
Terminal, tmux). Disabled on dumb terminals and non-TTY contexts.
unicode_symbols: boolRender decorative Unicode glyphs (❯, ◆, box-drawing corners).
Off → use ASCII fallbacks (>, *, +) so minimal terminals
(Windows legacy console, Docker/CI, POSIX locale without a full
font) don’t show □ tofu. Set via:
ATOMCODE_ASCII=1env var (explicit opt-out)TERM=dumbLC_ALL/LANGbeingC/POSIX/ANSI_X3.4-1968
Implementations§
Source§impl TerminalCaps
impl TerminalCaps
pub fn from_env(env: EnvView) -> Self
pub fn probe() -> Self
Sourcepub fn prompt_chevron(&self) -> &'static str
pub fn prompt_chevron(&self) -> &'static str
Two-cell prompt prefix for the input box and echoed user lines.
"❯ " when the terminal can render Unicode glyphs, "> " as the
ASCII fallback. Both are exactly 2 display columns, so layout
math (text_budget = w - 2) stays identical in both branches.
Trait Implementations§
Source§impl Clone for TerminalCaps
impl Clone for TerminalCaps
Source§fn clone(&self) -> TerminalCaps
fn clone(&self) -> TerminalCaps
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for TerminalCaps
impl Debug for TerminalCaps
impl Copy for TerminalCaps
Auto Trait Implementations§
impl Freeze for TerminalCaps
impl RefUnwindSafe for TerminalCaps
impl Send for TerminalCaps
impl Sync for TerminalCaps
impl Unpin for TerminalCaps
impl UnsafeUnpin for TerminalCaps
impl UnwindSafe for TerminalCaps
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> 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