---
title: "init(unsafeElements:)"
framework: Swift
role: symbol
role_heading: Initializer
platforms: [iOS 12.2+, iPadOS 12.2+, Mac Catalyst 12.2+, macOS 10.14.4+, tvOS 12.2+, visionOS 1.0+, watchOS 5.2+]
path: "swift/mutablerawspan/init(unsafeelements:)"
---

# init(unsafeElements:)

Unsafely convert a typed span to a raw span.

## Declaration

```swift
init<Element>(unsafeElements elements: consuming MutableSpan<Element>)
```

## Parameters

- `elements`: An existing MutableSpan<Element>, from which this MutableRawSpan will inherit its lifetime.

## Discussion

Discussion Creates a MutableRawSpan over the memory represented by a MutableSpan<Element>.
