DataItemConverter Protocol Reference
public protocol DataItemConverter<Convertible>
Classes that implement this protocol should be able to reconstruct an object of type Convertible from
a given DataItem, on the assumption that the DataItem accurately describes all
components required to create a new instance of type Convertible.
-
The type that this converter can produce from a DataItem.
Declaration
Swift
associatedtype Convertible -
Converts the provided
DataItemto an instance ofConvertible, if the conversion succeeds.Declaration
Swift
func convert(dataItem: DataItem) -> Convertible?