Google.Protobuf.UnsafeCollectionOperations
Returns a Span<T> that wraps the current backing array of the given RepeatedField<T>.
Values in the Span<T> should not be set to null. Use Remove or RemoveAt to remove items instead.
The returned Span<T> is only valid until the size of the RepeatedField<T> is modified, after which its state becomes undefined. Modifying existing elements without changing the size is safe as long as the modifications do not set null values.
Sets the count of the specified RepeatedField<T> to the given value.
This method should only be called if the subsequent code guarantees to populate the field with the specified number of items.
If count is less than Count, the collection is effectively trimmed down to the first count elements. Capacity is unchanged, meaning the underlying array remains allocated.