Structure

OpaquePointer

A wrapper around an opaque C pointer.

Declaration

struct OpaquePointer

Overview

Opaque pointers are used to represent C pointers to types that cannot be represented in Swift, such as incomplete struct types.

Topics

Initializers

init<T>(UnsafePointer<T>)

Converts a typed UnsafePointer to an opaque C pointer.

init<T>(UnsafeMutablePointer<T>)

Converts a typed UnsafeMutablePointer to an opaque C pointer.

init?<T>(UnsafePointer<T>?)

Converts a typed UnsafePointer to an opaque C pointer.

init?<T>(UnsafeMutablePointer<T>?)

Converts a typed UnsafeMutablePointer to an opaque C pointer.

init?(bitPattern: Int)

Creates an OpaquePointer from a given address in memory.

init?(bitPattern: UInt)

Creates an OpaquePointer from a given address in memory.

Instance Properties

var debugDescription: String

A textual representation of the pointer, suitable for debugging.

Instance Methods

func hash(into: inout Hasher)

Hashes the essential components of this value by feeding them into the given hasher.

Operator Functions

See Also

C and Objective-C Pointers

struct AutoreleasingUnsafeMutablePointer

A mutable pointer-to-ObjC-pointer argument.