AnyModelProvider

public struct AnyModelProvider<Element> : ModelProvider where Element : Model

Warning

Although this has public access, it is intended for internal & codegen use and should not be used directly by host applications. The behavior of this may change without warning. Though it is not used by host application making any change to these public types should be backward compatible, otherwise it will be a breaking change.
  • Declaration

    Swift

    public init<Provider>(provider: Provider) where Element == Provider.Element, Provider : ModelProvider
  • load() Asynchronous

    Declaration

    Swift

    public func load() async throws -> Element?
  • Declaration

    Swift

    public func getState() -> ModelProviderState<Element>
  • Declaration

    Swift

    public func encode(to encoder: Encoder) throws