-
Notifications
You must be signed in to change notification settings - Fork 133
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adds a `TagNumber` type for representing the lower 5 bits of a Tag, where bits 8/7 identify the class and bit 6 identifies primitive vs constructed forms. Changes `Tag` from being `repr(u8)` to a structured representation with `Application`, `ContextSpecific`, and `Private` variants, each of which includes a `TagNumber`. This enables support for all of these classes for tag numbers up to 30, which is the maximum value which can be represented with a single leading identifier octet. This change enables the `ContextSpecific` struct to have public members, as the tag number invariant can now be maintained by the `TagNumber` type instead.
- Loading branch information
Showing
5 changed files
with
243 additions
and
260 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.