ArchiveObject.getAttributeAs

Helper function to get an attribute/value as a certain type.

Notes: Other than making it easier to transform the ArchiveValue into the given type, this function performs an extra step.

Imagine if the value has a type of ubyte, but you want it as a uint.

Doing getAttribute("blah").get!uint would actually give you an error.

This function will automatically use the coerce function to make sure you'll get a uint even if the type stored is a ubyte.

class ArchiveObject
final
T
getAttributeAs
(
T
)
(
string name
,
lazy T default_ = T.init
)

Meta