OpaquePointer

struct OpaquePointer

A wrapper around an opaque C pointer.

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

Inheritance CVarArg, CustomDebugStringConvertible, Equatable, Hashable View Protocol Hierarchy →
Import import Swift

Initializers

init(_: UnsafeMutableRawPointer)

Declaration

init(_ from: UnsafeMutableRawPointer)
init(_: UnsafeRawPointer)

Declaration

init(_ from: UnsafeRawPointer)
init<T>(_: UnsafeMutablePointer<T>)

Converts a typed UnsafeMutablePointer to an opaque C pointer.

Declaration

init<T>(_ from: UnsafeMutablePointer<T>)
init<T>(_: UnsafePointer<T>)

Converts a typed UnsafePointer to an opaque C pointer.

Declaration

init<T>(_ from: UnsafePointer<T>)
init?(_: UnsafeMutableRawPointer?)

Declaration

init?(_ from: UnsafeMutableRawPointer?)
init?(_: UnsafeRawPointer?)

Declaration

init?(_ from: UnsafeRawPointer?)
init?<T>(_: UnsafeMutablePointer<T>?)

Converts a typed UnsafeMutablePointer to an opaque C pointer.

The result is nil if from is nil.

Declaration

init?<T>(_ from: UnsafeMutablePointer<T>?)
init?<T>(_: UnsafePointer<T>?)

Converts a typed UnsafePointer to an opaque C pointer.

The result is nil if from is nil.

Declaration

init?<T>(_ from: UnsafePointer<T>?)
init?(bitPattern: Int)

Creates an OpaquePointer from a given address in memory.

Declaration

init?(bitPattern: Int)
init?(bitPattern: UInt)

Creates an OpaquePointer from a given address in memory.

Declaration

init?(bitPattern: UInt)

Instance Variables

var debugDescription: String

A textual representation of the pointer, suitable for debugging.

Declaration

var debugDescription: String { get }
var hashValue: Int

The pointer's hash value.

The hash value is not guaranteed to be stable across different invocations of the same program. Do not persist the hash value across program runs.

Declaration

var hashValue: Int { get }

Instance Methods

func hash(into:)

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

hasher: The hasher to use when combining the components of this instance.

Declaration

func hash(into hasher: inout Hasher)