---
title: "append(_:as:)"
framework: Swift
role: symbol
role_heading: Instance Method
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/outputrawspan/append(_:as:)-89j87"
---

# append(_:as:)

Appends the given value’s bytes to this span’s bytes.

## Declaration

```swift
mutating func append<T>(_ value: T, as type: T.Type) where T : BitwiseCopyable, T : ConvertibleToBytes
```

## Parameters

- `value`: The value to store as raw bytes.
- `type`: The type of the instance to store.

## Discussion

Discussion There must be at least MemoryLayout<T>.size bytes available in the span.
