swash::text

Trait Codepoint

source
pub trait Codepoint: Sized + Copy {
Show 19 methods // Required methods fn properties(self) -> Properties; fn bracket_type(self) -> BracketType; fn opening_bracket(self) -> Option<char>; fn closing_bracket(self) -> Option<char>; fn mirror(self) -> Option<char>; fn compose(a: char, b: char) -> Option<char>; fn decompose(self) -> Decompose ; fn decompose_compatible(self) -> Decompose ; // Provided methods fn category(self) -> Category { ... } fn block(self) -> Block { ... } fn script(self) -> Script { ... } fn combining_class(self) -> u8 { ... } fn bidi_class(self) -> BidiClass { ... } fn joining_type(self) -> JoiningType { ... } fn cluster_break(self) -> ClusterBreak { ... } fn word_break(self) -> WordBreak { ... } fn line_break(self) -> LineBreak { ... } fn is_emoji(self) -> bool { ... } fn is_extended_pictographic(self) -> bool { ... }
}
Expand description

Trait that exposes Unicode properties for the char type.

Required Methods§

source

fn properties(self) -> Properties

Returns the codepoint properties.

source

fn bracket_type(self) -> BracketType

Returns the bracket type of the character.

source

fn opening_bracket(self) -> Option<char>

If the character is a closing bracket, returns its opening bracket pair.

source

fn closing_bracket(self) -> Option<char>

If the character is an opening bracket, returns its closing bracket pair.

source

fn mirror(self) -> Option<char>

Returns the mirror of the character, if any.

source

fn compose(a: char, b: char) -> Option<char>

Returns the composition of two characters, if any.

source

fn decompose(self) -> Decompose

Returns the canonical decomposition of the character.

source

fn decompose_compatible(self) -> Decompose

Returns the compatibility decomposition of the character.

Provided Methods§

source

fn category(self) -> Category

Returns the category of the character.

source

fn block(self) -> Block

Returns the unicode block that contains the character.

source

fn script(self) -> Script

Returns the script to which the character belongs.

source

fn combining_class(self) -> u8

Returns the canonical combining class of the character.

source

fn bidi_class(self) -> BidiClass

Returns the bidirectional type of the character.

source

fn joining_type(self) -> JoiningType

Returns the joining type of the character.

source

fn cluster_break(self) -> ClusterBreak

Returns the cluster break property for the character.

source

fn word_break(self) -> WordBreak

Returns the word break property for the character.

source

fn line_break(self) -> LineBreak

Returns the line break property for the character.

source

fn is_emoji(self) -> bool

Returns true if the character is an emoji.

source

fn is_extended_pictographic(self) -> bool

Returns true if the character is an extended pictographic symbol.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl Codepoint for char

Implementors§