Structureswift 6.0.1Swift
OpaquePointer
A wrapper around an opaque C pointer.
@frozen struct OpaquePointer
Opaque pointers are used to represent C pointers to types that cannot be represented in Swift, such as incomplete struct types.
Citizens in Swift
Conformances
protocol BitwiseCopyable
protocol CVarArg
A type whose instances can be encoded, and appropriately passed, as elements of a C
va_list
.protocol Copyable
A type whose values can be implicitly or explicitly copied.
protocol CustomDebugStringConvertible
A type with a customized textual representation suitable for debugging purposes.
protocol Equatable
A type that can be compared for value equality.
protocol Escapable
protocol Hashable
A type that can be hashed into a
Hasher
to produce an integer hash value.
Type members
init<T>(UnsafePointer<T>
) Converts a typed
UnsafePointer
to an opaque C pointer.init(UnsafeRawPointer
) init?<T>(UnsafePointer<T>?
) Converts a typed
UnsafePointer
to an opaque C pointer.init?(UnsafeRawPointer?
) init?<T>(UnsafeMutablePointer<T>?
) Converts a typed
UnsafeMutablePointer
to an opaque C pointer.init?(UnsafeMutableRawPointer?
) init<T>(UnsafeMutablePointer<T>
) Converts a typed
UnsafeMutablePointer
to an opaque C pointer.init(UnsafeMutableRawPointer
) init?(bitPattern: Int
) Creates a new
OpaquePointer
from the given address, specified as a bit pattern.init?(bitPattern: UInt
) Creates a new
OpaquePointer
from the given address, specified as a bit pattern.static func == (lhs: OpaquePointer, rhs: OpaquePointer
) -> Bool
Instance members
var debugDescription: String
A textual representation of the pointer, suitable for debugging.
func hash(into: inout Hasher
) Hashes the essential components of this value by feeding them into the given hasher.
Type features
static func != (lhs: Self, rhs: Self
) -> Bool Returns a Boolean value indicating whether two values are not equal.
Available in Synchronization
Conformances
protocol AtomicOptionalRepresentable
An atomic value that also supports atomic operations when wrapped in an
Optional
. Atomic optional representable types come with a standalone atomic representation for their optional-wrapped variants.protocol AtomicRepresentable
A type that supports atomic operations through a separate atomic storage representation.
Typealiases
Type members
static func decodeAtomicOptionalRepresentation(consuming OpaquePointer.AtomicOptionalRepresentation
) -> OpaquePointer? static func decodeAtomicRepresentation(consuming OpaquePointer.AtomicRepresentation
) -> OpaquePointer static func encodeAtomicOptionalRepresentation(consuming OpaquePointer?
) -> OpaquePointer.AtomicOptionalRepresentation static func encodeAtomicRepresentation(consuming OpaquePointer
) -> OpaquePointer.AtomicRepresentation