<!--
{
  "availability" : [
    "iOS: 12.2.0 -",
    "iPadOS: 12.2.0 -",
    "macCatalyst: 12.2.0 -",
    "macOS: 10.14.4 -",
    "tvOS: 12.2.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 5.2.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Swift",
  "identifier" : "/documentation/Swift/MutableRawSpan/init(mutating:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "Swift"
    ],
    "preciseIdentifier" : "s:s14MutableRawSpanV8mutatingABs0aC0VyxGz_tcs20ConvertibleFromBytesRzs0e2ToG0Rzlufc"
  },
  "title" : "init(mutating:)"
}
-->

# init(mutating:)

Mutate the elements of a typed span as bytes.

```
init<Element>(mutating elements: inout MutableSpan<Element>) where Element : ConvertibleFromBytes, Element : ConvertibleToBytes
```

## Parameters

`elements`

A typed span to reinterpret as raw bytes.

## Discussion

The stride of `Element` must equal its size, and the starting
address of `elements` must be well-aligned for `Element`.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)