Muokkaa

Jaa


SwiftSelf<T> Struct

Definition

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
SwiftSelf<T>

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.

Applies to