Archive.unarchiveStruct

Unarchives the struct associated with the given id.

  1. Id unarchiveStruct(string key, void delegate() dg)
  2. void unarchiveStruct(Id id, void delegate() dg)
    interface Archive
    void
    unarchiveStruct
    (,
    void delegate
    ()
    dg
    )

Parameters

id Id

the id associated with the struct

dg void delegate
()

a callback that performs the unarchiving of the individual fields. The callback will receive the key the struct was archived with.

Examples

struct Foo
{
    int a;
}

auto archive = new XmlArchive!();
archive.beginUnarchiving(data);
archive.unarchiveStruct(0, {
    // unarchive the fields of Foo
});

Meta