AnyFetchRequest

public struct AnyFetchRequest<RowDecoder> : FetchRequest

A type-erased FetchRequest.

An AnyFetchRequest forwards its operations to an underlying request, hiding its specifics.

  • Creates a request bound to type RowDecoder.

    Declaration

    Swift

    public func asRequest<RowDecoder>(of type: RowDecoder.Type) -> AnyFetchRequest<RowDecoder>

    Parameters

    type

    The fetched type RowDecoder

    Return Value

    A request bound to type RowDecoder.

AnyFetchRequest

  • Creates a request that wraps and forwards operations to request.

    Declaration

    Swift

    public init<Request: FetchRequest>(_ request: Request)
        where Request.RowDecoder == RowDecoder