Mojo module
unsafe_pointer_v2
Aliases
OpaqueImmutPointer
alias OpaqueImmutPointer[origin: ImmutableOrigin, *, address_space: AddressSpace = AddressSpace(0)] = UnsafePointerV2[NoneType, origin, address_space=address_space]
An immutable opaque pointer, equivalent to the C const void* type.
Parameters
- origin (
ImmutableOrigin): - address_space (
AddressSpace):
OpaqueMutPointer
alias OpaqueMutPointer[origin: MutableOrigin, *, address_space: AddressSpace = AddressSpace(0)] = UnsafePointerV2[NoneType, origin, address_space=address_space]
A mutable opaque pointer, equivalent to the C void* type.
Parameters
- origin (
MutableOrigin): - address_space (
AddressSpace):
OpaquePointerV2
alias OpaquePointerV2[mut: Bool, //, origin: Origin[mut], *, address_space: AddressSpace = AddressSpace(0)] = UnsafePointerV2[NoneType, origin, address_space=address_space]
An opaque pointer, equivalent to the C (const) void* type.
Parameters
- mut (
Bool): - origin (
Origin): - address_space (
AddressSpace):
UnsafeImmutPointer
alias UnsafeImmutPointer[type: AnyType, origin: ImmutableOrigin, *, address_space: AddressSpace = AddressSpace(0)] = UnsafePointerV2[type, origin, address_space=address_space]
An immutable unsafe pointer.
Parameters
- type (
AnyType): - origin (
ImmutableOrigin): - address_space (
AddressSpace):
UnsafeMutPointer
alias UnsafeMutPointer[type: AnyType, origin: MutableOrigin, *, address_space: AddressSpace = AddressSpace(0)] = UnsafePointerV2[type, origin, address_space=address_space]
A mutable unsafe pointer.
Parameters
- type (
AnyType): - origin (
MutableOrigin): - address_space (
AddressSpace):
Structs
-
UnsafePointerV2:UnsafePointerV2[T]represents an indirect reference to one or more values of typeTconsecutively in memory, and can refer to uninitialized memory.
Functions
-
alloc: Allocates contiguous storage forcountelements oftypewith alignmentalignment.
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!