<!--
{
  "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/RawSpan/init(elements:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "Swift"
    ],
    "preciseIdentifier" : "s:s7RawSpanV8elementsABs0B0VyxG_tcs18ConvertibleToBytesRzlufc"
  },
  "title" : "init(elements:)"
}
-->

# init(elements:)

View a typed span as a raw span.

```
init<Element>(elements span: Span<Element>) where Element : ConvertibleToBytes
```

## Parameters

`span`

An existing `Span<Element>`, from which this `RawSpan` will
inherit its lifetime.

## Discussion

Creates a `RawSpan` over the memory represented by a `Span<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)