invokeRaw

abstract fun invokeRaw(uri: <Error class: unknown class>, method: String, args: List<UByte>? = null, env: List<UByte>? = null, resolutionContext: <Error class: unknown class>? = null): List<UByte>

Invokes the wrapper at the specified URI with the provided options.

Return

A list of MessagePack-encoded bytes representing the invocation result

Parameters

uri

The URI of the wrapper to be invoked.

method

The method to be called on the wrapper.

args

Arguments for the method, encoded in the MessagePack byte format

env

Env variables for the wrapper invocation, encoded in the MessagePack byte format

resolutionContext

The FfiUriResolutionContext to be used during URI resolution, or null for a default context. The caller owns resolutionContext and is responsible for closing it to prevent a memory leak.

Throws

FfiException

abstract fun invokeRaw(uri: Uri, method: String, args: ByteArray?, env: ByteArray? = null, resolutionContext: <Error class: unknown class>? = null): Result<ByteArray>

Invoke a wrapper. This method automatically retrieves and caches the wrapper.

Return

A Result containing the invocation result as a ByteArray, or an error if the invocation fails.

Parameters

uri

The URI of the wrapper to be invoked.

method

The method to be called on the wrapper.

args

Arguments for the method, encoded in the MessagePack byte format

env

Env variables for the wrapper invocation, encoded in the MessagePack byte format

resolutionContext

The FfiUriResolutionContext to be used during URI resolution, or null for a default context. The caller owns resolutionContext and is responsible for closing it to prevent a memory leak.