EndpointBuilder

@_functionBuilder
public enum EndpointBuilder

A function builder used to aggregate multiple Endpoints into a single Endpoint.

  • A method that transforms multiple Endpoints into one.

    Declaration

    Swift

    public static func buildBlock(_ endpoints: Endpoint...) -> Endpoint

    Parameters

    endpoints

    One or more Endpoints to transform into a single endpoint.

    Return Value

    An abstract Endpoint consisting of one or more endpoints.

  • A method that enables the use of if-else in the Corvus DSL. This returns Endpoints within the if-part.

    Declaration

    Swift

    public static func buildEither(first: Endpoint) -> Endpoint

    Parameters

    first

    One or more Endpoints to transform into a single endpoint.

  • A method that enables the use of if-else in the Corvus DSL. This returns Endpoints within the else-part.

    Declaration

    Swift

    public static func buildEither(second: Endpoint) -> Endpoint

    Parameters

    first

    One or more Endpoints to transform into a single endpoint.