---
title: "withUnsafeMutablePointerToHeader(_:)"
framework: swift
role: symbol
role_heading: Instance Method
path: "swift/managedbuffer/withunsafemutablepointertoheader(_:)"
---

# withUnsafeMutablePointerToHeader(_:)

Call body with an UnsafeMutablePointer to the stored Header.

## Declaration

```swift
final func withUnsafeMutablePointerToHeader<E, R>(_ body: (UnsafeMutablePointer<Header>) throws(E) -> R) throws(E) -> R where E : Error, R : ~Copyable
```

## Discussion

Discussion note: This pointer is valid only for the duration of the call to body. The caller is responsible for ensuring that the buffer is not being accessed elsewhere while performing this call.
