init(exporting:importing:)
Creates a transfer representation that’s imported and exported by proxy through another transfer representation.
Declaration
init(exporting: @escaping @Sendable (Item) throws -> ProxyRepresentation, importing: @escaping @Sendable (ProxyRepresentation) async throws -> Item)Parameters
- exporting:
A closure that converts the item into desired representation.
- importing:
A closure that converts the chosen representation back into the transported item.