Storable

public protocol Storable

A type that can be stored by TweaKit.

Since TweaKit stores object in the form of Data, so the responsibility of Storable is to perform the conversion between Self and Data.

  • Converts data to the concrete type object.

    Declaration

    Swift

    static func convert(from data: Data) -> Self?

    Parameters

    data

    The data that the conversion performs from.

    Return Value

    The concrete type object.

  • Converts the receiver to Data object.

    Declaration

    Swift

    func convertToData() -> Data

    Return Value

    The Data object that the receiver converts to.