Skip to main content

TextSpacingClass

Enum TextSpacingClass 

Source
#[repr(u8)]
pub enum TextSpacingClass { Other = 0, Open = 1, Close = 2, Middle = 3, OpenNarrow = 4, CloseNarrow = 5, Dot = 6, Colon = 7, Semicolon = 8, OpenQuote = 9, CloseQuote = 10, }
Expand description

A character’s text-spacing class (CSS Text 4, section 8.5).

It says which full-width punctuation the character is, and so how text-spacing-trim treats it beside other punctuation. Five classes depend on the font: whether its dots and colons sit in the left half or the middle of their em, and whether its curly quotes are full width.

Variants§

§

Other = 0

Not punctuation the rule reads.

§

Open = 1

A full-width opening bracket, drawn in the right half of its em.

§

Close = 2

A full-width closing bracket, drawn in the left half.

§

Middle = 3

A middle dot or the ideographic space, drawn in the middle.

§

OpenNarrow = 4

An opening bracket that is not full width.

§

CloseNarrow = 5

A closing bracket that is not full width.

§

Dot = 6

The ideographic and fullwidth comma and full stop.

§

Colon = 7

The fullwidth colon.

§

Semicolon = 8

The fullwidth semicolon.

§

OpenQuote = 9

U+2018 and U+201C.

§

CloseQuote = 10

U+2019 and U+201D.

Trait Implementations§

Source§

impl Clone for TextSpacingClass

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Copy for TextSpacingClass

Source§

impl Debug for TextSpacingClass

Source§

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

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

impl Default for TextSpacingClass

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl Eq for TextSpacingClass

Source§

impl PartialEq for TextSpacingClass

Source§

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

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

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

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for TextSpacingClass

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

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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,

Source§

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

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

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.