@@ -65,7 +65,7 @@ public extension DataConnectDomainError {
6565 }
6666}
6767
68- /// Error code within an error domain
68+ /// A type that represents an error code within an error domain.
6969@available ( iOS 15 . 0 , macOS 12 . 0 , tvOS 15 . 0 , watchOS 8 . 0 , * )
7070public protocol DataConnectErrorCode : CustomStringConvertible , Equatable , Sendable , CaseIterable { }
7171
@@ -235,15 +235,13 @@ public struct OperationFailureResponse: Sendable {
235235 // (Partially) decoded data
236236 private let data : Sendable ?
237237
238- /// Returns ``rawJsonData`` string decoded into the given type, if decoding was
239- /// successful when the operation was executed. Returns `nil` if `rawJsonData`
240- /// is `nil`, if ``rawJsonData`` was _not_ able to be decoded when the operation
241- /// was executed, or if the given type is _not_ equal to the `Data` type that
242- /// was used when the operation was executed.
238+ /// Returns `rawJsonData` string decoded into the given type, if decoding was
239+ /// successful when the operation was executed.
243240 ///
244- /// This function does _not_ do the decoding itself, but simply returns
245- /// the decoded data, if any, that was decoded at the time of the
246- /// operation's execution.
241+ /// - Parameter asType: The type to decode the `rawJsonData` into (defaults to the inferred
242+ /// generic parameter).
243+ /// - Returns: The decoded data of type `Data` (generic parameter), if decoding to the
244+ /// generic parameter was successful when the operation was executed, `nil` otherwise.
247245 public func data< Data: Decodable > ( asType: Data . Type = Data . self) -> Data ? {
248246 return data as? Data
249247 }
0 commit comments