docs/Structs/DataStreamPublisher.html
public struct DataStreamPublisher<Value> : Publisher where Value : Sendable
Undocumented
`
Output
`
Swift
public typealias Output = DataStreamRequest.Stream<Value, AFError>
`
Failure
`
Swift
public typealias Failure = Never
`
init(_:queue:serializer:)
`
Creates an instance which will serialize responses using the provided DataStreamSerializer.
Swift
public init<Serializer: DataStreamSerializer>(_ request: DataStreamRequest, queue: DispatchQueue, serializer: Serializer)
where Value == Serializer.SerializedObject
| request |
DataStreamRequest for which to publish the response.
|
| queue |
DispatchQueue on which the Stream<Value, AFError> values will be published. .main by default.
|
| serializer |
DataStreamSerializer used to produce the published Stream<Value, AFError> values.
|
`
result()
`
Publishes only the Result of the DataStreamRequest.Stream‘s Events.
Swift
public func result() -> AnyPublisher<Result<Value, AFError>, Never>
The AnyPublisher publishing the Result<Value, AFError> value.
`
value()
`
Publishes the streamed values of the DataStreamRequest.Stream as a sequence of Value or fail with the AFError instance.
Swift
public func value() -> AnyPublisher<Value, AFError>
The AnyPublisher<Value, AFError> publishing the stream.
`
receive(subscriber:)
`
Swift
public func receive<S>(subscriber: S) where S : Subscriber, S : Sendable, S.Failure == Never, S.Input == DataStreamRequest.Stream<Value, AFError>