|
3 | 3 |
|
4 | 4 | usecrate::tables::identifier; |
5 | 5 |
|
| 6 | +pubuse identifier::IdentifierType; |
| 7 | + |
6 | 8 | /// Methods for determining characters not restricted from use for identifiers. |
7 | 9 | pubtraitGeneralSecurityProfile{ |
8 | 10 | /// Returns whether the character is not restricted from use for identifiers. |
9 | 11 | fnidentifier_allowed(self) ->bool; |
| 12 | + |
| 13 | +/// Returns the [identifier type](https://www.unicode.org/reports/tr39/#Identifier_Status_and_Type) |
| 14 | +fnidentifier_type(self) ->Option<IdentifierType>; |
10 | 15 | } |
11 | 16 |
|
12 | 17 | implGeneralSecurityProfileforchar{ |
13 | 18 | #[inline] |
14 | 19 | fnidentifier_allowed(self) ->bool{ identifier::identifier_status_allowed(self)} |
15 | | -} |
16 | | - |
17 | | -implGeneralSecurityProfilefor&'_str{ |
18 | 20 | #[inline] |
19 | | -fnidentifier_allowed(self) ->bool{self.chars().all(identifier::identifier_status_allowed)} |
| 21 | +fnidentifier_type(self) ->Option<IdentifierType>{ identifier::identifier_type(self)} |
| 22 | + |
20 | 23 | } |