---
title: "withContiguousStorageIfAvailable(_:)"
framework: tabulardata
role: symbol
role_heading: Instance Method
path: "tabulardata/column/withcontiguousstorageifavailable(_:)-6nbz3"
---

# withContiguousStorageIfAvailable(_:)

Call body(buffer), where buffer provides access to the non-optional contiguous storage of the entire column. If the column contains missing values, body is not called and nil is returned.

## Declaration

```swift
func withContiguousStorageIfAvailable<R>(_ body: (UnsafeBufferPointer<WrappedElement>) throws -> R) rethrows -> R?
```

## Parameters

- `body`: A closure to be executed using the elements of this collection.

## Return Value

Return Value The value returned by body, or nil.

## Discussion

Discussion The optimizer can often eliminate bounds- and uniqueness-checking within an algorithm. When that fails, however, invoking the same algorithm on body’s argument may let you trade safety for speed.
