File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -363,6 +363,16 @@ public protocol Sequence {
363
363
initializing ptr: UnsafeMutableBufferPointer < Element >
364
364
) -> ( Iterator , UnsafeMutableBufferPointer < Element > . Index )
365
365
366
+ /// Call `body(p)`, where `p` is a pointer to the collection's
367
+ /// contiguous storage. If no such storage exists, it is
368
+ /// first created. If the collection does not support an internal
369
+ /// representation in a form of contiguous storage, `body` is not
370
+ /// called and `nil` is returned.
371
+ ///
372
+ /// A `Collection` that provides its own implementation of this method
373
+ /// must also guarantee that an equivalent buffer of its `SubSequence`
374
+ /// can be generated by advancing the pointer by the distance to the
375
+ /// slice's `startIndex`.
366
376
func withContiguousStorageIfAvailable< R> (
367
377
_ body: ( UnsafeBufferPointer < Element > ) throws -> R
368
378
) rethrows -> R ?
You can’t perform that action at this time.
0 commit comments