Marshalls
Data transformation (marshaling) and encoding helpers.
Marshalls.swift:17class Marshalls
Provides data transformation and encoding utility functions.
Superclasses
class Object
Base class for all other classes in the engine.
Citizens in SwiftGodot
Conformances
protocol CustomStringConvertible
A type with a customized textual representation.
protocol Equatable
A type that can be compared for value equality.
protocol Hashable
A type that can be hashed into a
Hasher
to produce an integer hash value.protocol Identifiable<ID>
A class of types whose instances hold the value of an entity with stable identity.
protocol VariantRepresentable
Types that conform to VariantRepresentable can be stored directly in
Variant
with no conversion. These include all of the Variant types from Godot (for exampleGString
,Rect
,Plane
), Godot objects (those that subclass SwiftGodot.Object) as well as the built-in Swift types UInt8, Int64 and Double.protocol VariantStorable
Types that conform to VariantStorable can be stored in a Variant and can be extracted back out of a Variant.
Type members
static func base64ToRaw(base64Str: String
) -> PackedByteArray Returns a decoded
PackedByteArray
corresponding to the Base64-encoded stringbase64Str
.static func base64ToUtf8(base64Str: String
) -> String Returns a decoded string corresponding to the Base64-encoded string
base64Str
.static func base64ToVariant(base64Str: String, allowObjects: Bool
) -> Variant Returns a decoded
Variant
corresponding to the Base64-encoded stringbase64Str
. IfallowObjects
istrue
, decoding objects is allowed.static func rawToBase64(array: PackedByteArray
) -> String Returns a Base64-encoded string of a given
PackedByteArray
.static func utf8ToBase64(utf8Str: String
) -> String Returns a Base64-encoded string of the UTF-8 string
utf8Str
.static func variantToBase64(variant: Variant, fullObjects: Bool
) -> String Returns a Base64-encoded string of the
Variant
variant
. IffullObjects
istrue
, encoding objects is allowed (and can potentially include code).class var godotClassName: StringName