kellerkindt / asn1rs

Generates Rust Code and optionally compatible Protobuf schema files from ASN.1 definitions.
http://asn1.rs
Apache License 2.0
55 stars 20 forks source link

Implement UperReader for ScopedBitReader over Bits #81

Closed jkalez closed 1 year ago

jkalez commented 1 year ago

Previous implementations of UperReader required that a user have an implementation of Bits or a handful of other types (some primitives) in order to get a UperReader instance. However, the underlying implementation was designed to be generic over anything implementing ScopedBitReader. This commit removes the hard reliance on Bits in favor of being generic over ScopedBitReader. Users can now provide their own type implementing ScopedBitReader so and get their own implementation of UperReader. This is useful for streams of data which may not be easily represented as a Bits.

kellerkindt commented 1 year ago

Thanks!