---
title: "withContiguousMutableStorageIfAvailable(_:)"
framework: swift
role: symbol
role_heading: Instance Method
path: "swift/slice/withcontiguousmutablestorageifavailable(_:)-2ader"
---

# withContiguousMutableStorageIfAvailable(_:)

## Declaration

```swift
func withContiguousMutableStorageIfAvailable<R, Element>(_ body: (inout UnsafeMutableBufferPointer<Element>) throws -> R) rethrows -> R? where Base == UnsafeMutableBufferPointer<Element>
```
