Instance Methodswift 6.0.1Swift
advanced(by:)
func advanced(by n: Int) -> UnsafeRawPointer
Other members in extension
Typealiases
Type members
init<T>(UnsafePointer<T>
) Creates a new raw pointer from the given typed pointer.
init?<T>(UnsafePointer<T>?
) Creates a new raw pointer from the given typed pointer.
init?<T>(UnsafeMutablePointer<T>?
) Creates a new raw pointer from the given typed pointer.
init?(UnsafeMutableRawPointer?
) Creates a new raw pointer from the given mutable raw pointer.
init<T>(UnsafeMutablePointer<T>
) Creates a new raw pointer from the given typed pointer.
init(UnsafeMutableRawPointer
) Creates a new raw pointer from the given mutable raw pointer.
Instance members
func alignedDown<T>(for: T.Type
) -> UnsafeRawPointer Obtain the preceding pointer properly aligned to store a value of type
T
.func alignedDown(toMultipleOf: Int
) -> UnsafeRawPointer Obtain the preceding pointer whose bit pattern is a multiple of
alignment
.func alignedUp<T>(for: T.Type
) -> UnsafeRawPointer Obtain the next pointer properly aligned to store a value of type
T
.func alignedUp(toMultipleOf: Int
) -> UnsafeRawPointer Obtain the next pointer whose bit pattern is a multiple of
alignment
.func assumingMemoryBound<T>(to: T.Type
) -> UnsafePointer<T> Returns a typed pointer to the memory referenced by this pointer, assuming that the memory is already bound to the specified type.
func bindMemory<T>(to: T.Type, capacity: Int
) -> UnsafePointer<T> Binds the memory to the specified type and returns a typed pointer to the bound memory.
func deallocate(
) Deallocates the previously allocated memory block referenced by this pointer.
func load<T>(fromByteOffset: Int, as: T.Type
) -> T Returns a new instance of the given type, constructed from the raw memory at the specified offset.
func loadUnaligned<T>(fromByteOffset: Int, as: T.Type
) -> T Returns a new instance of the given type, constructed from the raw memory at the specified offset.
func loadUnaligned<T>(fromByteOffset: Int, as: T.Type
) -> T Returns a new instance of the given type, constructed from the raw memory at the specified offset.
func withMemoryRebound<T, E, Result>(to: T.Type, capacity: Int, (UnsafePointer<T>)
throws Executes the given closure while temporarily binding memory to the specified number of instances of type
T
.