OpaquePointer

struct OpaquePointer

A wrapper around an opaque C pointer.

Inheritance CustomDebugStringConvertible, Equatable, Hashable

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

Initializers

init init(_:) Required

Converts a typed UnsafePointer to an opaque C pointer.

Declaration

public init<T>(_ from: UnsafePointer<T>)
init init(_:) Required

Converts a typed UnsafeMutablePointer to an opaque C pointer.

Declaration

public init<T>(_ from: UnsafeMutablePointer<T>)
init init(_:) Required

Declaration

public init(_ from: UnsafeMutableRawPointer)
init init(_:) Required

Declaration

public init(_ from: UnsafeRawPointer)
init init?(_:) Required

Converts a typed UnsafePointer to an opaque C pointer.

The result is nil if from is nil.

Declaration

public init?<T>(_ from: UnsafePointer<T>?)
init init?(_:) Required

Converts a typed UnsafeMutablePointer to an opaque C pointer.

The result is nil if from is nil.

Declaration

public init?<T>(_ from: UnsafeMutablePointer<T>?)
init init?(_:) Required

Declaration

public init?(_ from: UnsafeMutableRawPointer?)
init init?(_:) Required

Declaration

public init?(_ from: UnsafeRawPointer?)
init init?(bitPattern:) Required

Creates an OpaquePointer from a given address in memory.

Declaration

public init?(bitPattern: Int)
init init?(bitPattern:) Required

Creates an OpaquePointer from a given address in memory.

Declaration

public init?(bitPattern: UInt)

Instance Variables

var debugDescription Required

A textual representation of the pointer, suitable for debugging.

Declaration

var debugDescription: String

Instance Methods

func hash(into hasher: inout Hasher) Required

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

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

Declaration

@inlinable public func hash(into hasher: inout Hasher)

Type Methods

func !=(lhs: Self, rhs: Self) -> Bool Required

Declaration

public static func !=(lhs: Self, rhs: Self) -> Bool
func ==(lhs: OpaquePointer, rhs: OpaquePointer) -> Bool Required

Returns a Boolean value indicating whether two values are equal.

Equality is the inverse of inequality. For any values a and b, a == b implies that a != b is false.

Declaration

@inlinable public static func ==(lhs: OpaquePointer, rhs: OpaquePointer) -> Bool