Storage Documentation

Structure Prefix

public struct Prefix<Parent: LoopEndpoint>  

A struct defining a custom endpoint implementation returning a wrapper for the first count output of a loop endpoint.

%47 Prefix Prefix LoopEndpoint LoopEndpoint Prefix->LoopEndpoint

Conforms To

LoopEndpoint

Nested Type Aliases

Output

public typealias Output = Parent.Output

The associated output type.

Initializers

init(_:​_:​)

public init(_ count: Int, @EndpointBuilder _ parent: () -> Parent)  

Init.

Parameters

count Int

A valid Int.

parent () -> Parent

A valid Parent factory.

Methods

resolve(with:​)

public func resolve<R: EndpointResolver>(with session: R) -> AsyncThrowingStream<Output, any Error>  

Fetch responses, from a given Input and URLSession.

Parameters

session R

The EndpointResolver used to fetch the response.

Returns

Some AsyncStream.

resolve(with:​)

public func resolve<R: EndpointResolver>(with session: R) -> AnyPublisher<Output, any Error>  

Fetch the response, from a given Input and URLSession.

Parameters

session R

The EndpointResolver used to fetch the response.

Returns

Some AnyPublisher.