Protocols

The following protocols are available globally.

  • A protocol to abstract Internet Archive properties to native Swift types

    This protocol allows converting different field types to more specific, native Swift types. For example, the Internet Archive metadata length field can be represented as a TimeInterval so an IATimeInterval knows how to convert 323.4 (seconds) or 5:23 (hh:mm:ss) to a TimeInterval

    A ModelFieldProtocol class is instantiated with a String and its value accessed through the value property.

    Example Usage

    let intField: IAInt = IAInt(string: "3")
    intField.value => 3
    
    See more

    Declaration

    Swift

    public protocol ModelFieldProtocol : Decodable