Contents

append(_:as:)

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

Declaration

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

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