Storage Documentation

Structure Any​Loop​Endpoint

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.

%7 AnyLoopEndpoint AnyLoopEndpoint LoopEndpoint LoopEndpoint AnyLoopEndpoint->LoopEndpoint

Conforms To

LoopEndpoint

Initializers

init(_:​)

public init(_ endpoint: AnyLoopEndpoint<Output>)  

Init.

Parameters

endpoint Any​Loop​Endpoint<Output>

A valid AnyLoopEndpoint.

init(_:​)

public init<E: LoopEndpoint>(_ endpoint: E) where E.Output == Output  

Init.

Parameters

endpoint E

Some LoopEndpoint.

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

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.