DataStreamTask
public struct DataStreamTask : Sendable
                Undocumented
- 
                  
                  
Undocumented
Declaration
Swift
public typealias Stream<Success, Failure> = StreamOf<DataStreamRequest.Stream<Success, Failure>> where Failure : Error - 
                  
                  
Creates a
StreamofDatavalues from the underlyingDataStreamRequest.Declaration
Parameters
shouldAutomaticallyCancelBoolindicating whether the underlyingDataStreamRequestshould be canceled which observation of the stream stops.trueby default.bufferingPolicyBufferingPolicythat determines the stream’s buffering behavior..unboundedby default.Return Value
The
Stream. - 
                  
                  
Creates a
StreamofUTF-8Strings from the underlyingDataStreamRequest.Declaration
Parameters
shouldAutomaticallyCancelBoolindicating whether the underlyingDataStreamRequestshould be canceled which observation of the stream stops.trueby default.bufferingPolicyBufferingPolicythat determines the stream’s buffering behavior..unboundedby default.Return Value
 - 
                  
                  
Creates a
StreamofDecodablevalues from the underlyingDataStreamRequest.Declaration
Parameters
typeDecodabletype to be serialized from stream payloads.shouldAutomaticallyCancelBoolindicating whether the underlyingDataStreamRequestshould be canceled which observation of the stream stops.trueby default.bufferingPolicyBufferingPolicythat determines the stream’s buffering behavior..unboundedby default.Return Value
The
Stream. - 
                  
                  
Creates a
Streamof values using the providedDataStreamSerializerfrom the underlyingDataStreamRequest.Declaration
Swift
public func streamingResponses<Serializer: DataStreamSerializer>(serializedUsing serializer: Serializer, automaticallyCancelling shouldAutomaticallyCancel: Bool = true, bufferingPolicy: Stream<Serializer.SerializedObject, AFError>.BufferingPolicy = .unbounded) -> Stream<Serializer.SerializedObject, AFError>Parameters
serializerDataStreamSerializerto use to serialize incomingData.shouldAutomaticallyCancelBoolindicating whether the underlyingDataStreamRequestshould be canceled which observation of the stream stops.trueby default.bufferingPolicyBufferingPolicythat determines the stream’s buffering behavior..unboundedby default.Return Value
The
Stream. - 
                  
                  
Cancel the underlying
DataStreamRequest.Declaration
Swift
public func cancel() - 
                  
                  
Resume the underlying
DataStreamRequest.Declaration
Swift
public func resume() - 
                  
                  
Suspend the underlying
DataStreamRequest.Declaration
Swift
public func suspend() 
            View on GitHub
          
            Install in Dash