Report a bug
If you spot a problem with this page, click here to create a GitHub issue.
Improve this page
Quickly fork, edit online, and submit a pull request for this page. Requires a signed-in GitHub account. This works well for small changes. If you'd like to make larger changes you may want to consider using a local clone.

mir.ion.deser.script

The module can be used for scripting languages to register type deserializer in the type system.
struct ScriptDeserializer(R);
The type should be used as the cast target for of scriptDeserializerHandle instance.
alias Handler = R function(const string[] symbolTable, scope const uint[] dynamicIndex, IonDescribedValue data) pure @safe;
Handler handler;
immutable(MirStringTable!uint)* table;
Compile-time deserilization symbol table
pure nothrow @nogc @safe ScriptDeserializer!R getScriptDeserializer(R)();
struct ScriptTypedArray(R, ValueTypeInfo);
ScriptTypeInfo!(R, ValueTypeInfo)* next;
Must not be null
struct ScriptTypedArray(R);
 ditto
ScriptTypeInfo!R* next;
Must not be null
struct ScriptTypedStruct(R, ValueTypeInfo);

struct ScriptTypedStruct(R);
ScriptTypeInfo!(R, ValueTypeInfo)* next;
Must not be null
struct ScriptTypeInfo(R, ValueTypeInfo);
alias Array = ScriptTypeInfo[];
alias Struct = StringMap!ScriptTypeInfo;
Variant!(ScriptTypedArray!(R, ValueTypeInfo), ScriptTypedStruct!(R, ValueTypeInfo), ValueTypeInfo, Array, Struct) typeInfoTree;
struct ScriptTypeInfo(R);
alias Array = ScriptTypeInfo[];
alias Struct = StringMap!ScriptTypeInfo;
Variant!(ScriptTypedArray!R, ScriptTypedStruct!R, ScriptDeserializer!R, Array, Struct) typeInfoTree;
this(TypeInfo)(ref const .ScriptTypeInfo!(R, TypeInfo) typeInfo, const ScriptDeserializer!R[ValueTypeInfo] typeInfoStruct);
R scriptDeserializeIon(R, RStruct = StringMap!R)(const ScriptTypeInfo!R typeInfo, const string[] symbolTable, IonDescribedValue ionValue);
Parameters:
R script varialble type, should be constructable from R[] and StringMap!R
RStruct script associative array type, should be constructable from (string[] keys, R[] values)
ScriptTypeInfo!R typeInfo type info
string[] symbolTable ion symbol table
IonDescribedValue ionValue ion described value