BerError

Type Alias BerError 

Source
pub type BerError = Error;

Aliased Type§

pub enum BerError {
Show 21 variants BerTypeError, BerValueError, InvalidLength, InvalidValue { tag: Tag, msg: String, }, InvalidTag, UnknownTag(u32), UnexpectedTag { expected: Option<Tag>, actual: Tag, }, UnexpectedClass { expected: Option<Class>, actual: Class, }, IndefiniteLengthUnexpected, ConstructExpected, ConstructUnexpected, IntegerTooLarge, IntegerNegative, BerMaxDepth, StringInvalidCharset, InvalidDateTime, DerConstraintFailed(DerConstraint), LifetimeError, Unsupported, Incomplete(Needed), NomError(ErrorKind),
}

Variants§

§

BerTypeError

BER object does not have the expected type

§

BerValueError

BER object does not have the expected value

§

InvalidLength

Invalid Length

§

InvalidValue

Invalid Value when parsing object with tag {tag:?} {msg:}

Fields

§tag: Tag
§

InvalidTag

Invalid Tag

§

UnknownTag(u32)

Unknown tag: {0:?}

§

UnexpectedTag

Unexpected Tag (expected: {expected:?}, actual: {actual:?})

Fields

§expected: Option<Tag>
§actual: Tag
§

UnexpectedClass

Unexpected Class (expected: {expected:?}, actual: {actual:?})

Fields

§expected: Option<Class>
§actual: Class
§

IndefiniteLengthUnexpected

Indefinite length not allowed

§

ConstructExpected

DER object was expected to be constructed (and found to be primitive)

§

ConstructUnexpected

DER object was expected to be primitive (and found to be constructed)

§

IntegerTooLarge

Integer too large to fit requested type

§

IntegerNegative

BER integer is negative, while an unsigned integer was requested

§

BerMaxDepth

BER recursive parsing reached maximum depth

§

StringInvalidCharset

Invalid encoding or forbidden characters in string

§

InvalidDateTime

Invalid Date or Time

§

DerConstraintFailed(DerConstraint)

DER Failed constraint: {0:?}

§

LifetimeError

Requesting borrowed data from a temporary object

§

Unsupported

Feature is not yet implemented

§

Incomplete(Needed)

incomplete data, missing: {0:?}

§

NomError(ErrorKind)

nom error: {0:?}

Layout§

Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.

Size: 32 bytes

Size for each variant:

  • BerTypeError: 0 bytes
  • BerValueError: 0 bytes
  • InvalidLength: 0 bytes
  • InvalidValue: 32 bytes
  • InvalidTag: 0 bytes
  • UnknownTag: 12 bytes
  • UnexpectedTag: 20 bytes
  • UnexpectedClass: 10 bytes
  • IndefiniteLengthUnexpected: 0 bytes
  • ConstructExpected: 0 bytes
  • ConstructUnexpected: 0 bytes
  • IntegerTooLarge: 0 bytes
  • IntegerNegative: 0 bytes
  • BerMaxDepth: 0 bytes
  • StringInvalidCharset: 0 bytes
  • InvalidDateTime: 0 bytes
  • DerConstraintFailed: 9 bytes
  • LifetimeError: 0 bytes
  • Unsupported: 0 bytes
  • Incomplete: 16 bytes
  • NomError: 9 bytes