Structure
AnyLoopEndpoint
public struct AnyLoopEndpoint<Output>
A struct
defining a loop endpoint
erasing all its transformations and mapping,
similar to AnyPublisher
.
If you are only targetting iOS 16, macOS 13,
tvOS 16 or watchOS 9 (and above), you can
possibly ignore this by returning
some LoopEndpoint<Output>
on
construction.
Relationships
Conforms To
LoopEndpoint
Initializers
init(_:)
public init(_ endpoint: AnyLoopEndpoint<Output>)
Init.
Parameters
Name | Type | Description |
---|---|---|
endpoint | AnyLoopEndpoint<Output> |
A valid |
init(_:)
public init<E: LoopEndpoint>(_ endpoint: E) where E.Output == Output
Init.
Parameters
Name | Type | Description |
---|---|---|
endpoint | E |
Some |
Methods
resolve(with:)
public func resolve<R: EndpointResolver>(with session: R) -> AsyncThrowingStream<Output, any Error>
Fetch the response, 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
.