---
title: "withUnsafeMutableBufferPointer(_:)"
framework: swift
role: symbol
role_heading: Instance Method
path: "swift/mutablespan/withunsafemutablebufferpointer(_:)"
---

# withUnsafeMutableBufferPointer(_:)

## Declaration

```swift
mutating func withUnsafeMutableBufferPointer<E, Result>(_ body: (UnsafeMutableBufferPointer<Element>) throws(E) -> Result) throws(E) -> Result where E : Error, Result : ~Copyable
```
