Initializerswift 6.0.1Swift
init(unsafeBufferObject:)
Manage the given buffer
.
init(unsafeBufferObject buffer: AnyObject)
Other members in extension
Type members
init(bufferClass: AnyClass, minimumCapacity: Int, makingHeaderWith: (AnyObject, (AnyObject) -> Int) throws -> Header
) rethrows Create with new storage containing an initial
Header
and space for at leastminimumCapacity
element
s.static func == (lhs: ManagedBufferPointer<Header, Element>, rhs: ManagedBufferPointer<Header, Element>
) -> Bool
Instance members
var buffer: AnyObject
Returns the object instance being used for storage.
var capacity: Int
The actual number of elements that can be stored in this object.
var header: Header
The stored
Header
instance.func isUniqueReference(
) -> Bool Returns
true
ifself
holds the only strong reference to its buffer; otherwise, returnsfalse
.func withUnsafeMutablePointerToElements<E, R>((UnsafeMutablePointer<Element>)
throws Call
body
with anUnsafeMutablePointer
to theElement
storage.func withUnsafeMutablePointerToHeader<E, R>((UnsafeMutablePointer<Header>)
throws Call
body
with anUnsafeMutablePointer
to the storedHeader
.func withUnsafeMutablePointers<E, R>((UnsafeMutablePointer<Header>, UnsafeMutablePointer<Element>)
throws Call
body
withUnsafeMutablePointer
s to the storedHeader
and rawElement
storage.