ByteBufferView
public struct ByteBufferView : RandomAccessCollection
extension ByteBufferView: MutableCollection
extension ByteBufferView: RangeReplaceableCollection
extension ByteBufferView: Equatable
extension ByteBufferView: Hashable
extension ByteBufferView: ExpressibleByArrayLiteral
A view into a portion of a ByteBuffer
.
A ByteBufferView
is useful whenever a Collection where Element == UInt8
representing a portion of a
ByteBuffer
is needed.
-
Declaration
Swift
public typealias Element = UInt8
-
Declaration
Swift
public typealias Index = Int
-
Declaration
Swift
public typealias SubSequence = ByteBufferView
-
Creates a
ByteBufferView
from the readable bytes of the givenbuffer
.Declaration
Swift
@inlinable public init(_ buffer: ByteBuffer)
-
Undocumented
Declaration
Swift
@inlinable public func withUnsafeBytes<R>(_ body: (UnsafeRawBufferPointer) throws -> R) rethrows -> R
-
Declaration
Swift
@inlinable public var startIndex: Index { get }
-
Declaration
Swift
@inlinable public var endIndex: Index { get }
-
-
Declaration
Swift
@inlinable public var count: Int { get }
-
Declaration
Swift
@inlinable public subscript(position: Index) -> UInt8 { get set }
-
Declaration
Swift
@inlinable public subscript(range: Range<Index>) -> ByteBufferView { get set }
-
Declaration
Swift
@inlinable public func withContiguousStorageIfAvailable<R>(_ body: (UnsafeBufferPointer<UInt8>) throws -> R) rethrows -> R?
-
Declaration
-
Declaration
-
Undocumented
Declaration
Swift
@inlinable public func _customContainsEquatableElement(_ element: Element) -> Bool?
-
Declaration
Swift
@inlinable public func _copyContents( initializing ptr: UnsafeMutableBufferPointer<UInt8> ) -> (Iterator, UnsafeMutableBufferPointer<UInt8>.Index)
-
Declaration
Swift
@inlinable public init()
-
Declaration
-
required by
Equatable
Declaration
Swift
@inlinable public static func == (lhs: ByteBufferView, rhs: ByteBufferView) -> Bool
-
required by
Hashable
Declaration
Swift
@inlinable public func hash(into hasher: inout Hasher)
-
required by
ExpressibleByArrayLiteral
Declaration
Swift
@inlinable public init(arrayLiteral elements: Element...)