---
title: "withUnsafeMutableBytes(_:)"
framework: foundation
role: symbol
role_heading: Instance Method
path: "foundation/data/withunsafemutablebytes(_:)-79c12"
---

# withUnsafeMutableBytes(_:)

## Declaration

```swift
mutating func withUnsafeMutableBytes<E, ResultType>(_ body: (UnsafeMutableRawBufferPointer) throws(E) -> ResultType) throws(E) -> ResultType where E : Error, ResultType : ~Copyable
```
