Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit6dc688d

Browse files
committed
Expose Identifier Type in API
1 parent14ed9b1 commit6dc688d

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

‎src/general_security_profile.rs‎

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,21 @@
33
44
usecrate::tables::identifier;
55

6+
pubuse identifier::IdentifierType;
7+
68
/// Methods for determining characters not restricted from use for identifiers.
79
pubtraitGeneralSecurityProfile{
810
/// Returns whether the character is not restricted from use for identifiers.
911
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>;
1015
}
1116

1217
implGeneralSecurityProfileforchar{
1318
#[inline]
1419
fnidentifier_allowed(self) ->bool{ identifier::identifier_status_allowed(self)}
15-
}
16-
17-
implGeneralSecurityProfilefor&'_str{
1820
#[inline]
19-
fnidentifier_allowed(self) ->bool{self.chars().all(identifier::identifier_status_allowed)}
21+
fnidentifier_type(self) ->Option<IdentifierType>{ identifier::identifier_type(self)}
22+
2023
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp