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.
Relationships
Conforms To
LoopEndpoint
Nested Type Aliases
Initializers
init(_:_:)
public init(_ count: Int, @EndpointBuilder _ parent: () -> Parent)
Init.
Parameters
| Name | Type | Description |
|---|---|---|
| count | Int |
A valid |
| parent | () -> Parent |
A valid |
Methods
resolve(with:)
public func resolve<R: EndpointResolver>(with session: R) -> AsyncThrowingStream<Output, any Error>
Fetch responses, from a given
Input and URLSession.
Parameters
| Name | Type | Description |
|---|---|---|
| session | R |
The |
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
| Name | Type | Description |
|---|---|---|
| session | R |
The |
Returns
Some AnyPublisher.