Skip to main content

TearCaps

Struct TearCaps 

Source
pub struct TearCaps;
Expand description

What tear advertises about itself when it is the HostRole::Host.

§These constants are a PROMISE, not a copy

A DA reply is a capability advertisement: a program reads it and then uses what it claims. So each field here has to be true of tear’s own renderer, and the temptation to paste mado’s constants is a trap.

mado advertises \x1b[?62;4;22c. The 4 means sixel, and mado’s own comment notes it was added “since the decode path landed”. tear has no sixel: GridState implements no hook/put/unhook, so a DCS image payload is swallowed by vte’s default no-op. Advertising 4 would tell every program on the system to send image data tear cannot draw.

So tear advertises VT220 + ANSI colour and nothing it cannot honour. When graphics land in PaneGrid, this constant moves in the same commit — that coupling is the point of it living beside the role.

Implementations§

Source§

impl TearCaps

Source

pub const PRIMARY_DA: &'static [u8] = b"\x1b[?62;22c"

Primary DA (CSI c): VT220 (62) with ANSI colour (22).

Deliberately WITHOUT 4 (sixel) — see the type doc.

Source

pub const SECONDARY_DA: &'static [u8] = b"\x1b[>1;0;0c"

Secondary DA (CSI > c): terminal id 1, version 0, cartridge 0 — the same shape mado reports.

Source

pub const STATUS_OK: &'static [u8] = b"\x1b[0n"

Device status report, “terminal OK” (CSI 5n).

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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

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> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

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

Source§

type Error = Infallible

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.