TypeRegistry.tryCreateFrom

Tries to create a type from the registry based on a DataNode. The DataNode must have a field called type.

struct TypeRegistry(T, Args...)
@nogc
T
tryCreateFrom
(
ref DataNode object
,
Args args
)

Parameters

object DataNode

The Object DataNode to deserialize from.

args Args

Arguments to pass to the type's constructor

Return Value

Type: T

A newly allocated type based on the type tag, or null if this failed.

Meta