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§
sourcefn properties(self) -> Properties
fn properties(self) -> Properties
Returns the codepoint properties.
sourcefn bracket_type(self) -> BracketType
fn bracket_type(self) -> BracketType
Returns the bracket type of the character.
sourcefn opening_bracket(self) -> Option<char>
fn opening_bracket(self) -> Option<char>
If the character is a closing bracket, returns its opening bracket pair.
sourcefn closing_bracket(self) -> Option<char>
fn closing_bracket(self) -> Option<char>
If the character is an opening bracket, returns its closing bracket pair.
sourcefn compose(a: char, b: char) -> Option<char>
fn compose(a: char, b: char) -> Option<char>
Returns the composition of two characters, if any.
sourcefn decompose_compatible(self) -> Decompose ⓘ
fn decompose_compatible(self) -> Decompose ⓘ
Returns the compatibility decomposition of the character.
Provided Methods§
sourcefn combining_class(self) -> u8
fn combining_class(self) -> u8
Returns the canonical combining class of the character.
sourcefn bidi_class(self) -> BidiClass
fn bidi_class(self) -> BidiClass
Returns the bidirectional type of the character.
sourcefn joining_type(self) -> JoiningType
fn joining_type(self) -> JoiningType
Returns the joining type of the character.
sourcefn cluster_break(self) -> ClusterBreak
fn cluster_break(self) -> ClusterBreak
Returns the cluster break property for the character.
sourcefn word_break(self) -> WordBreak
fn word_break(self) -> WordBreak
Returns the word break property for the character.
sourcefn line_break(self) -> LineBreak
fn line_break(self) -> LineBreak
Returns the line break property for the character.
sourcefn is_extended_pictographic(self) -> bool
fn is_extended_pictographic(self) -> bool
Returns true if the character is an extended pictographic symbol.
Object Safety§
This trait is not object safe.