docs/docsets/Alamofire.docset/Contents/Resources/Documents/Structs/DataStreamTask.html
public struct DataStreamTask : Sendable
Undocumented
`
Stream
`
Undocumented
Swift
public typealias Stream<Success, Failure> = StreamOf<DataStreamRequest.Stream<Success, Failure>> where Failure : Error
`
streamingData(automaticallyCancelling:bufferingPolicy:)
`
Creates a Stream of Data values from the underlying DataStreamRequest.
Swift
public func streamingData(automaticallyCancelling shouldAutomaticallyCancel: Bool = true, bufferingPolicy: Stream<Data, Never>.BufferingPolicy = .unbounded) -> Stream<Data, Never>
| shouldAutomaticallyCancel |
Bool indicating whether the underlying DataStreamRequest should be canceled which observation of the stream stops. true by default.
|
| bufferingPolicy |
BufferingPolicy that determines the stream’s buffering behavior..unbounded by default.
|
The Stream.
`
streamingStrings(automaticallyCancelling:bufferingPolicy:)
`
Creates a Stream of UTF-8 Strings from the underlying DataStreamRequest.
Swift
public func streamingStrings(automaticallyCancelling shouldAutomaticallyCancel: Bool = true, bufferingPolicy: Stream<String, Never>.BufferingPolicy = .unbounded) -> Stream<String, Never>
| shouldAutomaticallyCancel |
Bool indicating whether the underlying DataStreamRequest should be canceled which observation of the stream stops. true by default.
|
| bufferingPolicy |
BufferingPolicy that determines the stream’s buffering behavior..unbounded by default.
|
`
streamingDecodables(_:automaticallyCancelling:bufferingPolicy:)
`
Creates a Stream of Decodable values from the underlying DataStreamRequest.
Swift
public func streamingDecodables<T>(_ type: T.Type = T.self,
automaticallyCancelling shouldAutomaticallyCancel: Bool = true,
bufferingPolicy: Stream<T, AFError>.BufferingPolicy = .unbounded)
-> Stream<T, AFError> where T: Decodable & Sendable
| type |
Decodable type to be serialized from stream payloads.
|
| shouldAutomaticallyCancel |
Bool indicating whether the underlying DataStreamRequest should be canceled which observation of the stream stops. true by default.
|
| bufferingPolicy |
BufferingPolicy that determines the stream’s buffering behavior..unbounded by default.
|
The Stream.
`
streamingResponses(serializedUsing:automaticallyCancelling:bufferingPolicy:)
`
Creates a Stream of values using the provided DataStreamSerializer from the underlying DataStreamRequest.
Swift
public func streamingResponses<Serializer: DataStreamSerializer>(serializedUsing serializer: Serializer,
automaticallyCancelling shouldAutomaticallyCancel: Bool = true,
bufferingPolicy: Stream<Serializer.SerializedObject, AFError>.BufferingPolicy = .unbounded)
-> Stream<Serializer.SerializedObject, AFError>
| serializer |
DataStreamSerializer to use to serialize incoming Data.
|
| shouldAutomaticallyCancel |
Bool indicating whether the underlying DataStreamRequest should be canceled which observation of the stream stops. true by default.
|
| bufferingPolicy |
BufferingPolicy that determines the stream’s buffering behavior..unbounded by default.
|
The Stream.
`
cancel()
`
Cancel the underlying DataStreamRequest.
Swift
public func cancel()
`
resume()
`
Resume the underlying DataStreamRequest.
Swift
public func resume()
`
suspend()
`
Suspend the underlying DataStreamRequest.
Swift
public func suspend()