   ///   - objectType: The type as which this field should be read
   ///   - index: The index of this field
   /// - Returns: The decoded field
-  func readField<FieldType: ByteTreeScalarDecodable>(
+  mutating func readField<FieldType: ByteTreeScalarDecodable>(
     _ objectType: FieldType.Type, index: Int
   ) -> FieldType {
     advanceAndValidateIndex(index)

  ///   - objectType: The type as which this field should be read
  ///   - index: The index of this field
  /// - Returns: The decoded field
  func readField<FieldType: ByteTreeObjectDecodable>(
    _ objectType: FieldType.Type, index: Int
  ) -> FieldType {
    advanceAndValidateIndex(index)

/// Helper object for reading objects out a ByteTree. Keeps track that fields
/// are not read out of order and discards all trailing fields that were present
/// in the binary format but were not handled when reading the object.
struct ByteTreeObjectReader {
  /// The reader that holds a reference to the data from which the object is
  /// read
  private let reader: ByteTreeReader
