pub struct TerminalCaps {Show 24 fields
pub id: TerminalId,
pub charset: Charset,
pub graphics: Graphics,
pub kitty_placeholders: bool,
pub cell_px: Option<(u16, u16)>,
pub sixel_color_registers: Option<u16>,
pub sync_output: bool,
pub kitty_keyboard: Option<u8>,
pub screen_to_scrollback: bool,
pub margin_scrollback: bool,
pub hyperlinks: bool,
pub text_sizing: bool,
pub deccara: bool,
pub notify: NotifyProtocol,
pub osc99_confirmed: bool,
pub background: Option<(u16, u16, u16)>,
pub appearance_notifications: bool,
pub in_band_resize: bool,
pub paste_events: bool,
pub xterm_scroll_to_bottom_on_output: bool,
pub xterm_scroll_to_bottom_on_key_press: bool,
pub jamo_width: u8,
pub inside_tmux: bool,
pub inside_multiplexer: bool,
/* private fields */
}Expand description
Graphics-related terminal capabilities resolved for the current process.
Fields§
§id: TerminalIdDetected terminal emulator.
charset: CharsetGlyph capability tier inferred from the emulator (OMP_TUI_CHARSET
overrides).
graphics: GraphicsSafe image rendering mode.
kitty_placeholders: boolWhether Kitty Unicode placeholders are trusted for this terminal.
cell_px: Option<(u16, u16)>Pixel width and height of one terminal cell, when reported.
sixel_color_registers: Option<u16>Number of SIXEL color registers reported by XTSMGRAPHICS.
sync_output: boolWhether DEC synchronized output mode 2026 is supported.
kitty_keyboard: Option<u8>Kitty keyboard protocol flags reported by the terminal.
screen_to_scrollback: boolWhether cleared viewport content can be moved to native scrollback.
margin_scrollback: boolWhether rows scrolled out of a top-anchored DECSTBM region enter native scrollback.
hyperlinks: boolWhether OSC 8 hyperlinks are supported.
text_sizing: boolWhether Kitty OSC 66 text sizing is supported.
deccara: boolWhether Kitty-style DECCARA rectangular SGR is supported.
notify: NotifyProtocolNotification protocol selected for this terminal.
osc99_confirmed: boolWhether a Kitty OSC 99 capability reply confirmed rich notifications.
background: Option<(u16, u16, u16)>Terminal background color normalized to 16-bit RGB components.
appearance_notifications: boolWhether DEC mode 2031 appearance notifications are supported.
in_band_resize: boolWhether DEC mode 2048 in-band resize notifications are supported.
paste_events: boolWhether DEC mode 5522 enhanced paste offers are supported.
xterm_scroll_to_bottom_on_output: boolWhether xterm mode 1010 was set and may be temporarily disabled.
xterm_scroll_to_bottom_on_key_press: boolWhether xterm mode 1011 was set and may be temporarily disabled.
jamo_width: u8Hangul Compatibility Jamo width, or zero for the platform default.
inside_tmux: boolWhether the process is inside tmux.
inside_multiplexer: boolWhether a tmux, screen, Zellij, Herdr, or cmux marker was detected.
Implementations§
Source§impl TerminalCaps
impl TerminalCaps
Sourcepub fn resolve(
env_caps: Self,
probe: Option<&ProbeResults>,
forced: Option<Graphics>,
) -> Self
pub fn resolve( env_caps: Self, probe: Option<&ProbeResults>, forced: Option<Graphics>, ) -> Self
Resolves an explicit override, runtime replies, and environment fallback.
Explicit overrides win unchanged. A probe that received at least one recognizable reply supersedes environment protocol guesses. tmux can carry Kitty APC and SIXEL DCS through passthrough; other multiplexers conservatively disable non-forced graphics.
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 moreimpl Copy for TerminalCaps
Source§impl Debug for TerminalCaps
impl Debug for TerminalCaps
impl Eq for TerminalCaps
Source§impl PartialEq for TerminalCaps
impl PartialEq for TerminalCaps
impl StructuralPartialEq 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> 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.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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