Extensions on
LoopEndpoint
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.
eraseToAnyLoopEndpoint()
func eraseToAnyLoopEndpoint() -> AnyLoopEndpoint<Output>
Erase to AnyLoopEndpoint.
Returns
A valid AnyLoopEndpoint.
first()
func first() -> First<Self>
Collect the first output and wrap
it in a SingleEndpoint.
Returns
Some SingleEndpoint.
last()
func last() -> Last<Self>
Collect the final output and wrap
it in a SingleEndpoint.
Returns
Some SingleEndpoint.
collect()
func collect() -> Collect<Self>
Collect all outputs and wrap
them in a SingleEndpoint.
Returns
Some SingleEndpoint.
prefix(_:)
func prefix(_ count: Int) -> Prefix<Self>
Collect up to count outputs.
Parameters
| Name | Type | Description |
|---|---|---|
| count | Int |
A valid |
Returns
Some LoopEndpoint.