Managed
Deprecated.
Fields of this type
Fields
Functions in this namespace
Functions
- init
- Deinitialize with `deinit` or use `toOwnedSlice`.
- initCapacity
- Initialize with capacity to hold `num` elements.
- deinit
- Release all allocated memory.
- fromOwnedSlice
- ArrayList takes ownership of the passed in slice.
- fromOwnedSliceSentinel
- ArrayList takes ownership of the passed in slice.
- moveToUnmanaged
- Initializes an ArrayList with the `items` and `capacity` fields
- toOwnedSlice
- The caller owns the returned memory.
- toOwnedSliceSentinel
- The caller owns the returned memory.
- clone
- Creates a copy of this ArrayList, using the same allocator.
- insert
- Insert `item` at index `i`.
- insertAssumeCapacity
- Insert `item` at index `i`.
- addManyAt
- Add `count` new elements at position `index`, which have
- addManyAtAssumeCapacity
- Add `count` new elements at position `index`, which have
- insertSlice
- Insert slice `items` at index `i` by moving `list[i ..
- replaceRange
- Grows or shrinks the list as necessary.
- replaceRangeAssumeCapacity
- Grows or shrinks the list as necessary.
- append
- Extends the list by 1 element.
- appendAssumeCapacity
- Extends the list by 1 element.
- orderedRemove
- Remove the element at index `i`, shift elements after index
- swapRemove
- Removes the element at the specified index and returns it.
- appendSlice
- Append the slice of items to the list.
- appendSliceAssumeCapacity
- Append the slice of items to the list.
- appendUnalignedSlice
- Append an unaligned slice of items to the list.
- appendUnalignedSliceAssumeCapacity
- Append the slice of items to the list.
- writer
- Initializes a Writer which will append to the list.
- fixedWriter
- Initializes a Writer which will append to the list but will return
- appendNTimes
- Append a value to the list `n` times.
- appendNTimesAssumeCapacity
- Append a value to the list `n` times.
- resize
- Adjust the list length to `new_len`.
- shrinkAndFree
- Reduce allocated capacity to `new_len`.
- shrinkRetainingCapacity
- Reduce length to `new_len`.
- clearRetainingCapacity
- Invalidates all element pointers.
- clearAndFree
- Invalidates all element pointers.
- ensureTotalCapacity
- If the current capacity is less than `new_capacity`, this function will
- ensureTotalCapacityPrecise
- If the current capacity is less than `new_capacity`, this function will
- ensureUnusedCapacity
- Modify the array so that it can hold at least `additional_count` **more** items.
- expandToCapacity
- Increases the array's length to match the full capacity that is already allocated.
- addOne
- Increase length by 1, returning pointer to the new item.
- addOneAssumeCapacity
- Increase length by 1, returning pointer to the new item.
- addManyAsArray
- Resize the array, adding `n` new elements, which have `undefined` values.
- addManyAsArrayAssumeCapacity
- Resize the array, adding `n` new elements, which have `undefined` values.
- addManyAsSlice
- Resize the array, adding `n` new elements, which have `undefined` values.
- addManyAsSliceAssumeCapacity
- Resize the array, adding `n` new elements, which have `undefined` values.
- pop
- Remove and return the last element from the list, or return `null` if list is empty.
- allocatedSlice
- Returns a slice of all the items plus the extra capacity, whose memory
- unusedCapacitySlice
- Returns a slice of only the extra capacity after items.
- getLast
- Returns the last element from the list.
- getLastOrNull
- Returns the last element from the list, or `null` if list is empty.
Source
Implementation
pub fn Managed(comptime T: type) type {
return AlignedManaged(T, null);
}