init(mutableBytes:)
Convert a raw span to a typed span.
Declaration
init(mutableBytes: consuming MutableRawSpan)Parameters
- mutableBytes:
A raw span to reinterpret as typed elements.
Discussion
The byteCount of mutableBytes must be a multiple of Element’s stride, and the starting address of mutableBytes must be well-aligned for the type of Element. If either of these requirements is not met, this initializer will trap at runtime.