Enum term_model::ansi::Mode

source ·
pub enum Mode {
Show 17 variants CursorKeys = 1, DECCOLM = 3, Insert = 4, Origin = 6, LineWrap = 7, BlinkingCursor = 12, LineFeedNewLine = 20, ShowCursor = 25, ReportMouseClicks = 1_000, ReportCellMouseMotion = 1_002, ReportAllMouseMotion = 1_003, ReportFocusInOut = 1_004, Utf8Mouse = 1_005, SgrMouse = 1_006, AlternateScroll = 1_007, SwapScreenAndSetRestoreCursor = 1_049, BracketedPaste = 2_004,
}
Expand description

Terminal modes

Variants§

§

CursorKeys = 1

?1

§

DECCOLM = 3

Select 80 or 132 columns per page

CSI ? 3 h -> set 132 column font CSI ? 3 l -> reset 80 column font

Additionally,

  • set margins to default positions
  • erases all data in page memory
  • resets DECLRMM to unavailable
  • clears data from the status line (if set to host-writable)
§

Insert = 4

IRM Insert Mode

NB should be part of non-private mode enum

  • CSI 4 h change to insert mode
  • CSI 4 l reset to replacement mode
§

Origin = 6

?6

§

LineWrap = 7

?7

§

BlinkingCursor = 12

?12

§

LineFeedNewLine = 20

20

NB This is actually a private mode. We should consider adding a second enumeration for public/private modesets.

§

ShowCursor = 25

?25

§

ReportMouseClicks = 1_000

?1000

§

ReportCellMouseMotion = 1_002

?1002

§

ReportAllMouseMotion = 1_003

?1003

§

ReportFocusInOut = 1_004

?1004

§

Utf8Mouse = 1_005

?1005

§

SgrMouse = 1_006

?1006

§

AlternateScroll = 1_007

?1007

§

SwapScreenAndSetRestoreCursor = 1_049

?1049

§

BracketedPaste = 2_004

?2004

Implementations§

source§

impl Mode

source

pub fn from_primitive(intermediate: Option<&u8>, num: i64) -> Option<Mode>

Create mode from a primitive

TODO lots of unhandled values..

Trait Implementations§

source§

impl Debug for Mode

source§

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

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

impl PartialEq for Mode

source§

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

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

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

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Eq for Mode

source§

impl StructuralPartialEq for Mode

Auto Trait Implementations§

§

impl Freeze for Mode

§

impl RefUnwindSafe for Mode

§

impl Send for Mode

§

impl Sync for Mode

§

impl Unpin for Mode

§

impl UnwindSafe for Mode

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> 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, U> TryFrom<U> for T
where U: Into<T>,

§

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>,

§

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.