SwiftSelf<T> Struct
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Represents the Swift 'self' context when the argument is Swift frozen struct T, which is either enregistered into multiple registers, or passed by reference in the 'self' register.
generic <typename T>
where T : value classpublic value class SwiftSelf
public readonly struct SwiftSelf<T> where T : struct
type SwiftSelf<'T (requires 'T : struct)> = struct
Public Structure SwiftSelf(Of T)
Type Parameters
- T
The type of the frozen struct to pass in the 'self' context.
- Inheritance
Remarks
This struct is used to pass the Swift frozen struct T to Swift functions in the context of interop with .NET.
Here's an example of how a SwiftSelf<T> context can be declared: [UnmanagedCallConv(CallConvs = [typeof(CallConvSwift)])] [LibraryImport("SwiftLibrary", EntryPoint = "export")] public static extern void swiftFunction(SwiftSelf<T> self);
Constructors
SwiftSelf<T>(T) |
Creates a new instance of the SwiftSelf struct with the specified value. |
Properties
Value |
Gets the value representing the Swift frozen struct. |