Extensions on
SingleEndpoint
Methods
_resolve(with:)
@_spi(Private)
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.
eraseToAnySingleEndpoint()
func eraseToAnySingleEndpoint() -> AnySingleEndpoint<Output>
Erase to AnySingleEndpoint.
Returns
A valid AnySingleEndpoint.
eraseToAnyLoopEndpoint()
func eraseToAnyLoopEndpoint() -> AnyLoopEndpoint<Output>
Erase to AnyLoopEndpoint.
Returns
A valid AnyLoopEndpoint.
flatMap(to:)
func flatMap<E: Endpoint>(@EndpointBuilder to child: @escaping (Output) -> E) -> FlatMap<Self, E>
Switch the current endpoint response with a new one fetched from some other (related) endpoint.
Parameters
| Name | Type | Description |
|---|---|---|
| child | @escaping (Output) -> E |
Some |
Returns
Some FlatMap.