namespace Misaki.HighPerformance.Unsafe.Collections.Contracts; public unsafe interface IUnsafeCollection : IEnumerable, IDisposable where T : unmanaged { /// /// Gets the number of elements in a collection. The value is read-only. /// public int Count { get; } /// /// Indicates whether the object has been created. Returns true if the object is created, otherwise false. /// public bool IsCreated { get; } /// /// Removes all elements from the collection. The collection will be empty after this operation. /// public void Clear(); /// /// Changes the size of a collection or array to the specified value. /// /// Specifies the new size to which the collection or array should be adjusted. public void Resize(int newSize); /// /// Returns a pointer to an unmanaged memory location. This pointer can be used for low-level memory operations. /// /// The method returns a void pointer to the unsafe memory location. public void* GetUnsafePtr(); }