Merge pull request #8661 from ProofOfKeags/feature/record-producer-axiom

tlv: add axiomatic RecordProducer implementation for Record
This commit is contained in:
Oliver Gugger
2024-04-22 01:42:06 -06:00
committed by GitHub

View File

@@ -63,6 +63,15 @@ type Record struct {
decoder Decoder
}
// Record (the function) is the trivial implementation of RecordProducer for
// Record (the type). This makes it seamless to mix primitive and dynamic
// records together in the same collections.
//
// NOTE: Part of the RecordProducer interface.
func (f *Record) Record() Record {
return *f
}
// Size returns the size of the Record's value. If no static size is known, the
// dynamic size will be evaluated.
func (f *Record) Size() uint64 {