Edit

Share via


SwiftIndirectResult Struct

Definition

Important

This API is not CLS-compliant.

Represents the Swift return buffer context.

public value class SwiftIndirectResult
[System.CLSCompliant(false)]
public readonly struct SwiftIndirectResult
[<System.CLSCompliant(false)>]
type SwiftIndirectResult = struct
Public Structure SwiftIndirectResult
Inheritance
SwiftIndirectResult
Attributes

Examples

Here's an example of how a SwiftIndirectResult can be declared:

[UnmanagedCallConv(CallConvs = [typeof(CallConvSwift)])]
[LibraryImport("SwiftLibrary", EntryPoint = "export")]
public static extern void swiftFunction(SwiftIndirectResult result);

Remarks

This struct is used to access the return buffer when interoping with Swift functions that return non-frozen structs. It provides a pointer to the memory location where the result should be stored.

Constructors

SwiftIndirectResult(Void*)

Creates a new instance of the SwiftIndirectResult struct with the specified pointer value.

Properties

Value

Gets the pointer of the return buffer register.

Applies to