Developer Documentation

OdinCustomData

public enum OdinCustomData

Collection of helper functions to handle ODIN user data.

Methods

encode(_:)

public static func encode(_ string: String) -> [UInt8]

Converts a string to a byte array.

decode(_:)

public static func decode(_ bytes: [UInt8]) -> String

Converts a byte array to a string.

encode(_:)

public static func encode<T: Encodable>(_ codable: T) -> [UInt8]

Converts a codable type to a byte array.

decode(_:)

public static func decode<T: Decodable>(_ bytes: [UInt8]) -> T?

Converts a byte array to a codable type.