Structs§

  • A fixed-size stack with capacity determined at run-time. The elements of the stack are uninitialized. Elements may be initialized with push and then retrieved as a reference with get. push returns the index of the element in the stack. The caller may reserve space for multiple elements with reserve_uninit. Reserved elements must be initialized with set. Calling push, reserve_uninit, or set is thread-safe. The stack will panic if the capacity is exceeded, or the index is out of range, or the set function is called more than once on an index when T is not zero-sized, or if the set function is called on an index that was not reserved by a prior call to reserve_uninit. The stack will only drop initialized elements.