-
Notifications
You must be signed in to change notification settings - Fork 214
Open
Labels
enhancementNew feature or requestNew feature or request
Description
The closure-taking functions in Data's API should support
- typed throws
- non-copyable returned values
These are:
public func withUnsafeBytes<ResultType>(_ body: (UnsafeRawBufferPointer) throws -> ResultType) rethrows -> ResultTypepublic func withContiguousStorageIfAvailable<ResultType>(_ body: (_ buffer: UnsafeBufferPointer<UInt8>) throws -> ResultType) rethrows -> ResultType?public mutating func withUnsafeMutableBytes<ResultType>(_ body: (UnsafeMutableRawBufferPointer) throws -> ResultType) rethrows -> ResultType
Generalizing these functions on the concrete type does not negatively affect its protocol conformances.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request