Contents

RawSpan

RawSpan represents a contiguous region of memory which contains initialized bytes.

Declaration

@frozen struct RawSpan

Overview

A RawSpan instance is a non-owning, non-escaping view into memory. When a RawSpan is created, it inherits the lifetime of the container owning the contiguous memory, ensuring temporal safety and avoiding use-after-free errors. Operations on RawSpan are bounds-checked, ensuring spatial safety and avoiding buffer overflow errors.

Topics

Initializers

Instance Properties

Instance Methods

See Also

Safe Memory Access