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.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.