Skip to content
FutureBlitz

    Install

    Import std.core.load

    std.core.load

    What Load<T>(value) and Save(x) read: the attributes on a Struct's or Class's Fields that change how they're loaded and saved, and the Interfaces of a type that converts itself. The compiler builds each type's Load and Save, Field by Field, over the Package Functions below. One that can fail puts its ParseError in its last parameter, as a Function that throws does, but without a Throw, so it gets its Place where Load<T> is called.

    std/core/load.fb

    Types

    Rename attribute

    Public Attribute Rename(Name: String)

    The key a Field has in a Value's Object, in place of its name.

    std/core/load.fb, line 20

    Skip attribute

    Public Attribute Skip

    A Field that Load leaves at its default, and Save leaves out.

    std/core/load.fb, line 22

    Flatten attribute

    Public Attribute Flatten

    A Struct's or Class's Field whose own Fields go in the Object with the others, not in an Object of their own.

    std/core/load.fb, line 25

    Renamed attribute

    Public Attribute Renamed(From: String)

    The key a Field had before, which Load reads when the Object doesn't have its key, so what an older version saved still loads.

    std/core/load.fb, line 28

    Loadable interface

    Public Interface Loadable

    A type that makes itself from a Value, which Load<T> calls in place of filling its Fields.

    std/core/load.fb, line 31

    • Static Method FromValue(value: Value): Self Throws ParseError static method #

      Makes one from a Value, as Load does.

    Saveable interface

    Public Interface Saveable

    A type that gives its own Value, which Save calls in place of writing its Fields.

    std/core/load.fb, line 37

    • Method ToValue(): Value method #

      Its Value, as Save writes it.

    Report an issue with this page or with FutureBlitz on GitHub.