Call body(p), where p is a pointer to the collection’s contiguous storage.  If no such storage exists, it is first created.  If the collection does not support an internal representation in a form of contiguous storage, body is not called and nil is returned.
SDK
- Xcode 10.2+
Framework
- Swift Standard Library
Declaration
func withContiguousStorageIfAvailable<R>(_ body: (UnsafeBufferPointer  <Element>) throws -> R) rethrows -> R?
Discussion
A Collection that provides its own implementation of this method must also guarantee that an equivalent buffer of its Sub can be generated by advancing the pointer by the distance to the slice’s start.
Note
This documentation comment was inherited from Sequence.