Instance Propertyswift 6.0.1Swift
capacity
The actual number of elements that can be stored in this object.
- OpenBSD
- unavailable
final var capacity: Int { get }
This header may be nontrivial to compute; it is usually a good idea to store this information in the “header” area when an instance is created.
Other members in extension
Type members
class func create(minimumCapacity: Int, makingHeaderWith: (ManagedBuffer<Header, Element>) throws -> Header
) rethrows -> ManagedBuffer<Header, Element> Create a new instance of the most-derived class, calling
factory
on the partially-constructed object to generate an initialHeader
.
Instance members
var header: Header
The stored
Header
instance.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.