Enum makeup::SgrParameter

source ·
pub enum SgrParameter {
Show 46 variants Reset, Bold, Faint, Italic, Underline, Blink, RapidBlink, ReverseVideo, Conceal, CrossedOut, PrimaryFont, AlternativeFont(u64), Fraktur, DoubleUnderline, NormalIntensity, NotItalicOrBlackletter, NotUnderlined, SteadyCursor, ProportionalSpacing, NotReversed, Reveal, NotCrossedOut, ForegroundColour(Colour), BackgroundColour(Colour), HexForegroundColour(u32), HexBackgroundColour(u32), DefaultForegroundColour, DefaultBackgroundColour, DisableProportionalSpacing, Framed, Encircled, Overlined, NotFramedOrEncircled, NotOverlined, UnderlineColour(Colour), HexUnderlineColour(u32), DefaultUnderlineColour, IdeogramUnderlineOrRightSideLine, IdeogramDoubleUnderlineOrDoubleLineOnTheRightSide, IdeogramOverlineOrLeftSideLine, IdeogramDoubleOverlineOrDoubleLineOnTheLeftSide, IdeogramStressMarking, IdeogramAttributesOff, Superscript, Subscript, NotSuperscriptOrSubscript,
}
Expand description

Variants§

§

Reset

Reset all attributes.

§

Bold

Bold.

§

Faint

Faint.

§

Italic

Italic.

§

Underline

Underline.

Blink.

Rapid blink.

§

ReverseVideo

Reverse video (note: Wikipedia notes inconsistent behaviour). Also known as “invert.”

§

Conceal

Conceal / hide text (note: Wikipedia notes lack of wide support).

§

CrossedOut

Crossed out. Not supported in Terminal.app.

§

PrimaryFont

Select the primary font.

§

AlternativeFont(u64)

Select the alternative font at the given index (N-10).

§

Fraktur

Fraktur/Gothic mode (note: Wikipedia notes lack of wide support).

§

DoubleUnderline

Double underline. Note: On some systems, this may instead disable Bold.

§

NormalIntensity

Normal intensity.

§

NotItalicOrBlackletter

Not italic or blackletter.

§

NotUnderlined

Not underlined.

§

SteadyCursor

Steady cursor (not blinking).

§

ProportionalSpacing

Proportional spacing. Note: Wikipedia says:

ITU T.61 and T.416, not known to be used on terminals.

§

NotReversed

Not reversed. Presumably undoes ReverseVideo, needs testing.

§

Reveal

Reveal concealed text. Presumably undoes Conceal, needs testing.

§

NotCrossedOut

Not crossed out.

§

ForegroundColour(Colour)

Set foreground colour to the given colour.

§

BackgroundColour(Colour)

Set background colour to the given colour.

§

HexForegroundColour(u32)

Set the foreground colour to the given hex colour.

§

HexBackgroundColour(u32)

Set the background colour to the given hex colour.

§

DefaultForegroundColour

Presumably resets to the default foreground colour, needs testing.

§

DefaultBackgroundColour

Presumably resets to the default background colour, needs testing.

§

DisableProportionalSpacing

Disable proportional spacing.

§

Framed

Set the framing (encircled) attribute.

§

Encircled

Set the encircled attribute.

§

Overlined

Set the overlined attribute. Note: Not supported in Terminal.app. Note: On some systems, this may instead enable Bold.

§

NotFramedOrEncircled

Not framed or encircled.

§

NotOverlined

Not overlined.

§

UnderlineColour(Colour)

Set the underline colour. Note: Not in standard, implemented in Kitty, VTE, mintty, iTerm2.

§

HexUnderlineColour(u32)

Set the underline colour to the given hex colour. Note: Not in standard, implemented in Kitty, VTE, mintty, iTerm2.

§

DefaultUnderlineColour

Set the underline colour to the default. Note: Not in standard, implemented in Kitty, VTE, mintty, iTerm2.

§

IdeogramUnderlineOrRightSideLine

Ideogram underline or right side line.

§

IdeogramDoubleUnderlineOrDoubleLineOnTheRightSide

Ideogram double underline or double line on the right side.

§

IdeogramOverlineOrLeftSideLine

Ideogram overline or left side line.

§

IdeogramDoubleOverlineOrDoubleLineOnTheLeftSide

Ideogram double overline or double line on the left side.

§

IdeogramStressMarking

Ideogram stress marking.

§

IdeogramAttributesOff

Ideogram attributes off. Resets:

  • IdeogramUnderlineOrRightSideLine
  • IdeogramDoubleUnderlineOrDoubleLineOnTheRightSide
  • IdeogramOverlineOrLeftSideLine
  • IdeogramDoubleOverlineOrDoubleLineOnTheLeftSide
  • IdeogramStressMarking.
§

Superscript

Implemented only in mintty.

§

Subscript

Implemented only in mintty.

§

NotSuperscriptOrSubscript

Implemented only in mintty.

Trait Implementations§

source§

impl Clone for SgrParameter

source§

fn clone(&self) -> SgrParameter

Returns a copy of the value. Read more
1.0.0 · source§

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

Performs copy-assignment from source. Read more
source§

impl Debug for SgrParameter

source§

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

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

impl Hash for SgrParameter

source§

fn hash<__H>(&self, state: &mut __H)
where __H: Hasher,

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl Ord for SgrParameter

source§

fn cmp(&self, other: &SgrParameter) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized + PartialOrd,

Restrict a value to a certain interval. Read more
source§

impl PartialEq for SgrParameter

source§

fn eq(&self, other: &SgrParameter) -> 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 PartialOrd for SgrParameter

source§

fn partial_cmp(&self, other: &SgrParameter) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

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

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

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

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · source§

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

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

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

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
source§

impl Eq for SgrParameter

source§

impl StructuralEq for SgrParameter

source§

impl StructuralPartialEq for SgrParameter

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> AsAny for T
where T: Any,

source§

fn as_any(&self) -> &(dyn Any + 'static)

source§

fn as_mut_any(&mut self) -> &mut (dyn Any + 'static)

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> ToOwned for T
where T: Clone,

§

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

§

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.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V