ProtocolFoundation
DataProtocol
protocol DataProtocol : RandomAccessCollection where Self.Element == UInt8, Self.SubSequence : DataProtocol
protocol DataProtocol : RandomAccessCollection where Self.Element == UInt8, Self.SubSequence : DataProtocol
var regions: Self.Regions
A BidirectionalCollection
of DataProtocol
elements which compose a discontiguous buffer of memory. Each region is a contiguous buffer of bytes.
func copyBytes<DestinationType>(to: UnsafeMutableBufferPointer<DestinationType>, count: Int) -> Int
Copies count
bytes from the start of the buffer to the destination buffer.
func copyBytes(to: UnsafeMutableRawBufferPointer, count: Int) -> Int
Copies count
bytes from the start of the buffer to the destination buffer.
func copyBytes<R>(to: UnsafeMutableRawBufferPointer, from: R) -> Int
Copies the bytes from the given range to the destination buffer.
func copyBytes<DestinationType, R>(to: UnsafeMutableBufferPointer<DestinationType>, from: R) -> Int
Copies the bytes from the given range to the destination buffer.
func firstRange<D, R>(of: D, in: R) -> Range<Self.Index>?
Returns the first found range of the given data buffer.
func lastRange<D, R>(of: D, in: R) -> Range<Self.Index>?
Returns the last found range of the given data buffer.