Struct der::TagNumber

source ·
pub struct TagNumber(_);
Expand description

ASN.1 tag numbers (i.e. lower 5 bits of a Tag).

From X.690 Section 8.1.2.2:

bits 5 to 1 shall encode the number of the tag as a binary integer with bit 5 as the most significant bit.

This library supports tag numbers ranging from zero to 30 (inclusive), which can be represented as a single identifier octet.

Section 8.1.2.4 describes how to support multi-byte tag numbers, which are encoded by using a leading tag number of 31 (0b11111). This library deliberately does not support this: tag numbers greater than 30 are disallowed.

Implementations§

Tag number 0

Tag number 1

Tag number 2

Tag number 3

Tag number 4

Tag number 5

Tag number 6

Tag number 7

Tag number 8

Tag number 9

Tag number 10

Tag number 11

Tag number 12

Tag number 13

Tag number 14

Tag number 15

Tag number 16

Tag number 17

Tag number 18

Tag number 19

Tag number 20

Tag number 21

Tag number 22

Tag number 23

Tag number 24

Tag number 25

Tag number 26

Tag number 27

Tag number 28

Tag number 29

Tag number 30

Create a new tag number (const-friendly).

Panics if the tag number is greater than 30. For a fallible conversion, use TryFrom instead.

Create an APPLICATION tag with this tag number.

Create a CONTEXT-SPECIFIC tag with this tag number.

Create a PRIVATE tag with this tag number.

Get the inner value.

Trait Implementations§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Formats the value using the given formatter. Read more
Converts to this type from the input type.
This method returns an Ordering between self and other. Read more
Compares and returns the maximum of two values. Read more
Compares and returns the minimum of two values. Read more
Restrict a value to a certain interval. Read more
This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more
This method returns an ordering between self and other values if one exists. Read more
This method tests less than (for self and other) and is used by the < operator. Read more
This method tests less than or equal to (for self and other) and is used by the <= operator. Read more
This method tests greater than (for self and other) and is used by the > operator. Read more
This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
The type returned in the event of a conversion error.
Performs the conversion.

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.