pub struct PerCodecData { /* private fields */ }
Expand description

Structure representing an APER Codec.

While En(De)coding ASN.1 Types using the APER encoding scheme, the encoded data is stored in a BitVec.

Implementations

Default PerCodecData for AperCodec

Default PerCodecData for UperCodec

Create Our PerCodecData Structure from a slice of u8 for AperCodec

Create Our PerCodecData Structure from a slice of u8 for UperCodec

Get’s the inner buffer as a Vec<u8> consuming the struct.

Align to 8 bit boundry during decode.

Get’s the current key value.

This value will be used by a decoder to determine which ‘decode’ function is to be called (for example in an enum, it will be used to determine which variant of the enum will be decoded.

Sets the current key value.

During decoding ‘open’ types, the ‘key’ used to decode the type further is determined by a key_value field. ie. a field with attribute key_value set in a struct (derived from a SEQUENCE ASN.1 type.) This value is passed to the ‘decoder’ logic further through set_key function, which updates the internal state of the decoder data.

Dump current ‘offset’.

Reserve certain bits at the current offset.

seek pointer to the offset in the internal buffer

Get the length of the data in bytes This is useful when encoding an open type.

Append one encoding to another preserving byte alignment. This is useful when encoding an open type.

Trait Implementations

Formats the value using the given formatter. Read more
Returns the “default value” for a type. Read more

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
Converts self into T using Into<T>. Read more
Causes self to use its Binary implementation when Debug-formatted. Read more
Causes self to use its Display implementation when Debug-formatted. Read more
Causes self to use its LowerExp implementation when Debug-formatted. Read more
Causes self to use its LowerHex implementation when Debug-formatted. Read more
Causes self to use its Octal implementation when Debug-formatted. Read more
Causes self to use its Pointer implementation when Debug-formatted. Read more
Causes self to use its UpperExp implementation when Debug-formatted. Read more
Causes self to use its UpperHex implementation when Debug-formatted. Read more
Formats each item in a sequence. 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.

Pipes by value. This is generally the method you want to use. Read more
Borrows self and passes that borrow into the pipe function. Read more
Mutably borrows self and passes that borrow into the pipe function. Read more
Borrows self, then passes self.borrow() into the pipe function. Read more
Mutably borrows self, then passes self.borrow_mut() into the pipe function. Read more
Borrows self, then passes self.as_ref() into the pipe function.
Mutably borrows self, then passes self.as_mut() into the pipe function. Read more
Borrows self, then passes self.deref() into the pipe function.
Mutably borrows self, then passes self.deref_mut() into the pipe function. Read more
Immutable access to a value. Read more
Mutable access to a value. Read more
Immutable access to the Borrow<B> of a value. Read more
Mutable access to the BorrowMut<B> of a value. Read more
Immutable access to the AsRef<R> view of a value. Read more
Mutable access to the AsMut<R> view of a value. Read more
Immutable access to the Deref::Target of a value. Read more
Mutable access to the Deref::Target of a value. Read more
Calls .tap() only in debug builds, and is erased in release builds.
Calls .tap_mut() only in debug builds, and is erased in release builds. Read more
Calls .tap_borrow() only in debug builds, and is erased in release builds. Read more
Calls .tap_borrow_mut() only in debug builds, and is erased in release builds. Read more
Calls .tap_ref() only in debug builds, and is erased in release builds. Read more
Calls .tap_ref_mut() only in debug builds, and is erased in release builds. Read more
Calls .tap_deref() only in debug builds, and is erased in release builds. Read more
Calls .tap_deref_mut() only in debug builds, and is erased in release builds. Read more
Attempts to convert self into T using TryInto<T>. Read more
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.