---
title: OutputSpan
framework: swift
role: symbol
role_heading: Structure
path: swift/outputspan
---

# OutputSpan

## Declaration

```swift
@frozen struct OutputSpan<Element> where Element : ~Copyable
```

## Topics

### Initializers

- [init()](swift/outputspan/init().md)
- [init(buffer:initializedCount:)](swift/outputspan/init(buffer:initializedcount:)-3tbg3.md)
- [init(buffer:initializedCount:)](swift/outputspan/init(buffer:initializedcount:)-vie3.md)

### Instance Properties

- [capacity](swift/outputspan/capacity.md)
- [count](swift/outputspan/count.md)
- [freeCapacity](swift/outputspan/freecapacity.md)
- [indices](swift/outputspan/indices.md)
- [isEmpty](swift/outputspan/isempty.md)
- [isFull](swift/outputspan/isfull.md)
- [mutableSpan](swift/outputspan/mutablespan.md)
- [span](swift/outputspan/span.md)

### Instance Methods

- [append(_:)](swift/outputspan/append(_:).md)
- [append(repeating:count:)](swift/outputspan/append(repeating:count:).md)
- [finalize(for:)](swift/outputspan/finalize(for:)-5utkq.md)
- [finalize(for:)](swift/outputspan/finalize(for:)-83pw0.md)
- [removeAll()](swift/outputspan/removeall().md)
- [removeLast()](swift/outputspan/removelast().md)
- [removeLast(_:)](swift/outputspan/removelast(_:).md)
- [swapAt(_:_:)](swift/outputspan/swapat(_:_:).md)
- [swapAt(unchecked:unchecked:)](swift/outputspan/swapat(unchecked:unchecked:).md)
- [withBytes(_:)](swift/outputspan/withbytes(_:).md)
- [withUnsafeMutableBufferPointer(_:)](swift/outputspan/withunsafemutablebufferpointer(_:).md)

### Subscripts

- [subscript(_:)](swift/outputspan/subscript(_:).md)
- [subscript(unchecked:)](swift/outputspan/subscript(unchecked:).md)

### Type Aliases

- [OutputSpan.Index](swift/outputspan/index.md)

## Relationships

### Conforms To

- [ContiguousBytes](foundation/contiguousbytes.md)
- [Sendable](swift/sendable.md)
- [SendableMetatype](swift/sendablemetatype.md)

## See Also

### Safe Memory Access

- [Span](swift/span.md)
- [RawSpan](swift/rawspan.md)
- [OutputRawSpan](swift/outputrawspan.md)
- [UTF8Span](swift/utf8span.md)
- [MutableSpan](swift/mutablespan.md)
- [MutableRawSpan](swift/mutablerawspan.md)
