COpaquePointer

struct COpaquePointer

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 CVarArgType, CustomDebugStringConvertible, Equatable, Hashable, NilLiteralConvertible View Protocol Hierarchy →
Import import Swift

Initializers

init()

Construct a nil instance.

Deprecated: init() will be removed in Swift 3. Use nil instead.

Declaration

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

Convert a typed UnsafeMutablePointer to an opaque C pointer.

Declaration

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

Convert a typed UnsafePointer to an opaque C pointer.

Declaration

init<T>(_ source: UnsafePointer<T>)
init(bitPattern: Int)

Construct a COpaquePointer from a given address in memory.

This is a fundamentally unsafe conversion.

Declaration

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

Construct a COpaquePointer from a given address in memory.

This is a fundamentally unsafe conversion.

Declaration

init(bitPattern: UInt)
init(nilLiteral:)

Create an instance initialized with nil.

Declaration

init(nilLiteral: ())

Instance Variables

var debugDescription: String

A textual representation of self, suitable for debugging.

Declaration

var debugDescription: String { get }
var hashValue: Int

The hash value.

Axiom: x == y implies x.hashValue == y.hashValue.

Note: 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 }